From 31812f5c431fe8dbd211cc9349f39da95654e8fa Mon Sep 17 00:00:00 2001 From: Christian Hagau Date: Tue, 20 Aug 2024 18:09:55 +0200 Subject: [PATCH] plots: fix count plot axis parameter Count plots don't need to define the y-axis, only the x-axis. --- plots.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/plots.py b/plots.py index 3115ee3..f2ad7fc 100644 --- a/plots.py +++ b/plots.py @@ -876,12 +876,20 @@ def plot_catplot(self, df, x='v2x_rate', y='cbr', hue='moduleName', row='dcc', c kwargs = self.set_plot_specific_options(plot_type, **kwargs) logd(f'PlottingTask::plot_catplot: {df.columns=}') - grid = sb.catplot(data=df, x=x, y=y, row=row, col=column - , hue=hue - , kind=plot_type - # , legend_out=False - , **kwargs - ) + if plot_type != 'count': + grid = sb.catplot(data=df, x=x, y=y, row=row, col=column + , hue=hue + , kind=plot_type + # , legend_out=False + , **kwargs + ) + else: + grid = sb.catplot(data=df, x=x, row=row, col=column + , hue=hue + , kind=plot_type + # , legend_out=False + , **kwargs + ) grid = self.set_grid_defaults(grid)