dexplo / bar_chart_race

Create animated bar chart races in Python with matplotlib
MIT License
1.35k stars 351 forks source link

Index location - make adjustable? #9

Closed thecraigd closed 4 years ago

thecraigd commented 4 years ago

First of all, thanks for putting this together, it's a really easy-to-use and effective way to produce a good-looking bar chart race.

Is it possible to make the location of the index when use_index=True adjustable? For the video I created the index (in this case the year) overlaps with the bottom bars.

This is the code I used in Jupyter. The full Notebook is here

    df=income_new,
    filename='income.mp4',
    period_length=250,
    title='GDP per capita (in 2011 USD)',
    n_bars=10)

This is just a suggestion for an improvement. If there were an argument that could be passed with a few different options (eg right, centre, left, upper_right, lower_right) that would allow the user to avoid this issue.

Thanks again for your work on this package.

tdpetrou commented 4 years ago

Thanks for using bar_chart_race! I just released a new version with a huge number of options. You can place a label on the graph exactly where you want it, format it with date directives or new-style string formatting and even place more custom text for each frame.

Check out the tutorial in the docs for the full rundown. www.dexplo.org/bar_chart_race