a Pythonic way to draw a bump chart
Asked Answered
V

1

5

I have a csv file that contains data I want to represent using a bump chart (as an example )

http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0003nk

BUT I need to have some control over the formatting and would like to approach this in the most Pythonic way possible ( I am fairly new to Python using 3.5) so wonder if anyone could tell me which graphing package gives me the kind of control that would allow me to:

  • draw a bump chart
  • specify the font (Gill Sans)
  • specify the number of pixels per centimeter squared (about 10000)

If anyone has a package that is in the open source environment that would be the best fit for me I would be grateful.

Veracity answered 29/7, 2015 at 1:25 Comment(6)
from natplotlib import pyplotMeteoric
how do you do a bump chart in matplotlib?Quadrireme
I'm not familiar with bump charts - looks like a line chart to me?Meteoric
hey Maxymoo sorry about the formatting and thanks for tidying up my mess, Sorry Steven but it's not a line chart at all please look at the write up and I think you will see it's a little more multidimensional than that.Veracity
If you just want a tool that can do bump charts, try RAW (github.com/densitydesign/raw), which uses numerous JavaScript libraries. Potentially RAW could be reverse engineered and reimplimented with Python, at least for bump charts.Bary
thanks Tris but I am a PYTHON man through and through.Veracity
V
7

SO I have accidently found my answer myself in the example I gave. A VERY splendid man called Pascal Schetalat has an EXCELLENT implementation in Python using Numpy and Pandas. Here is the link

http://nbviewer.ipython.org/gist/pascal-schetelat/8382651

thank YOU Pascal

Veracity answered 29/7, 2015 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.