Skip to content
New issue

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

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

Already on GitHub? # to your account

How to add multiple years onto the x bar in a bar plot #6941

Open
DAONEJ opened this issue Nov 28, 2024 · 5 comments
Open

How to add multiple years onto the x bar in a bar plot #6941

DAONEJ opened this issue Nov 28, 2024 · 5 comments

Comments

@DAONEJ
Copy link

DAONEJ commented Nov 28, 2024

I'm trying to group this bar plot by year, however only one year is showing up and I can't figure out why. Can anyone help before I toss my computer out the window?

image

@processo
Copy link

It looks like all total value data has 2015 as year. Can you share your data structure and what you did in Edit Domain?

@DAONEJ
Copy link
Author

DAONEJ commented Nov 29, 2024

It looks like all total value data has 2015 as year. Can you share your data structure and what you did in Edit Domain?

Thanks for getting back to me! so this is what I've done in the domain. I've changed year to catagorical because I need to group the data by year. I'll admit I've only been using this software for a day and it's really confusing me. This is the plot I made in seaborn that I'm trying to replicate in Orange. I cant seem to figure out how to get all the years to show up on the one bar.
Any Idea what I'm doing wrong?
image

image
image

@processo
Copy link

I see now. Bar Plot in Orange cannot do aggregation so it tried to plot every line of data from 2015 then ran out of space at 200 bars.

As far as I know, only Box Plot and Violin Plot are capable of aggregation by category. If you want to compare yearly values with error bars a vertical Violin Plot can do something similar:

violin plot 2

@wvdvegte
Copy link

wvdvegte commented Dec 3, 2024

You can also use Time Series add-on -> Moving Transform widget -> Aggregate time periods to aggregate by year before Bar Plot. And I think the Line Chart in the same add-on is more suitable to your needs ...

@processo
Copy link

processo commented Dec 3, 2024

@wvdvegte is right. Line Chart supports columns (bars) and multiple variables.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants