Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-axis for the bar plot should be labeled Value instead of Category #620

Closed
npatki opened this issue Aug 7, 2024 · 0 comments · Fixed by #621
Closed

X-axis for the bar plot should be labeled Value instead of Category #620

npatki opened this issue Aug 7, 2024 · 0 comments · Fixed by #621
Assignees
Labels
bug Something isn't working feature:visualization Related to visualizations
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Aug 7, 2024

Environment Details

  • SDMetrics version: 0.15.0 (latest)

Error Description

When visualizing a single column's distribution (univariate), users can supply the plot_type to switch between rendering as a distplot or as a bar plot. Continuous values (numerical/discrete) are usually defaulted as distplots but sometimes, it is better to show them as bar plots due to the nature of the data -- eg. if it has many outliers or cannot be shown smoothly.

However, the x-axis title on all bar plots is Category. This only makes sense for discrete (categorical) columns, not for continuous columns that I'm choosing to visualize as a bar plot.

Expected Fix: Change the x-axis title to Value instead. This word works for both discrete and continuous columns.

Steps to reproduce

from sdv.datasets.demo import download_demo
from sdv.evaluation.single_table import get_column_plot

data, metadata = download_demo(
    modality='single_table',
    dataset_name='fake_hotel_guests'
)

fig = get_column_plot(
    real_data=data,
    synthetic_data=None,
    metadata=metadata,
    column_name='amenities_fee',
    plot_type='bar'
)
    
fig.show()
image
@npatki npatki added bug Something isn't working feature:visualization Related to visualizations labels Aug 7, 2024
@R-Palazzo R-Palazzo self-assigned this Aug 9, 2024
@R-Palazzo R-Palazzo added this to the 0.15.1 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature:visualization Related to visualizations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants