0

Is it possible to implement the following style of graph in Python?

http://fivethirtyeight.com/features/every-nba-teams-chance-of-winning-in-every-minute-across-every-game/

I specifically require being able to hover (or click) on a data point and the whole line is then highlighted while the others are made dull.

smci
  • 32,567
  • 20
  • 113
  • 146
Dan
  • 21
  • 1
  • 1
  • yes it is possible...... Check eg. matplotlib.org – Johan Feb 23 '15 at 09:26
  • I'm not sure but I don't think matplotlib has mouse hover kind of feature – Tanveer Alam Feb 23 '15 at 09:27
  • 1
    Yes, with Bokeh. This question should never have been closed (@vaultah, Jack Maney, l4mpi, Burhan Khalid, Odedra). The question was clearly asking how to get the interactivity. The question is well-defined, on-topic and not "too broad". +1 – smci Mar 23 '15 at 06:26
  • Dan: do you want this in the browser, or in a standalone Python session? – smci Mar 23 '15 at 06:31

1 Answers1

2

Yes! Matplotlib is probably your best bet, although there are also a lot of newer libraries such as Bokeh with similar functionalities.

See this question for more detail on how to use Matplotlib and this one, for a better hover implementation.

Here's a great walk-through of a variety of options for making this sort of graph: http://nbviewer.ipython.org/gist/msund/11349097

Community
  • 1
  • 1
seaotternerd
  • 6,298
  • 2
  • 47
  • 58