-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
How can I plot from smallest to the largest values? #54
Comments
Hey, I had the same issue. I solved it by changing codes on the original package. I think you can download it, check it out, maybe it can help you! |
Hi, Thank you for the prompt response. Can you, by any chance, point me out where to look in the code? Andreas |
First you need to put the "bar_chart_race2" folder on the same folder that your project is. The modified code is "_make_chart.py". There are some '#' that indicates where in the code was modified. But basicaly what I did was invert the way Data is shown on the plot, the "lower" bar stays on top. The code that uses this modified library is "rsg_barplot.py " It's important to import the library like: The code "rsg_barplot.py " basically do a clean up to the date on the data.frame, put it as the index. and create the plot. I'm not sure if it will work well with any data, and I forgot lot of what was done. But I hope if you look carefully through the code it can help you :) |
Thanks a lot :) |
Thank you Beatriz! There were a number of changes in your modified version of _make_chart.py. Most of them are related to formatting of labels. The change needed to fix this reported issue is just one line. Line 893 needs to change from:
to:
This worked perfectly on my data. Thanks again. |
Hello,
I am trying to plot the bottom 10 categories from my dataset. I am changing the sort attribute to 'asc' and then it just plots the top 10 categories in ascending order,
let's say we have 5 categories e.g.
Category | Value
category 1| 1
category 2| 2
category 3| 3
category 4| 4
category 5| 5
and I want to plot (animate) the bottom 3. If I change the sort to attribute to asc then the plot is like this:
category 3| 3
category 4| 4
category 5| 5
but it should have been
category 1| 1
category 2| 2
category 3| 3
Do you have any idea how to fix this?
Thanks a lot,
Andreas
The text was updated successfully, but these errors were encountered: