Skip to content

Commit

Permalink
X-axis for the bar plot should be labeled Value instead of `Categor…
Browse files Browse the repository at this point in the history
…y` (#621)
  • Loading branch information
R-Palazzo authored Aug 12, 2024
1 parent 685731f commit 6491ccf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sdmetrics/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def _generate_column_plot(
plot_title (str, optional):
Title to use for the plot. Defaults to 'Real vs. Synthetic Data for column {column}'
x_label (str, optional):
Label to use for x-axis. Defaults to 'Category'.
Label to use for x-axis. Defaults to 'Value'.
Returns:
plotly.graph_objects._figure.Figure
Expand Down Expand Up @@ -353,7 +353,7 @@ def _generate_column_plot(
plot_title = title

if not x_label:
x_label = 'Category'
x_label = 'Value'

fig.update_layout(
title=plot_title,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def test___generate_column_plot_type_bar(mock_bar_plot):
mock_bar_plot.assert_called_once_with(ANY, ANY, {})
mock_fig.update_layout.assert_called_once_with(
title="Real vs. Synthetic Data for column 'values'",
xaxis_title='Category',
xaxis_title='Value',
yaxis_title='Frequency',
plot_bgcolor=PlotConfig.BACKGROUND_COLOR,
annotations=[],
Expand Down

0 comments on commit 6491ccf

Please sign in to comment.