Tag Archives: mpld3

I asked for an improvement to mpld3, and somebody did it!

So cool! http://nbviewer.ipython.org/gist/aflaxman/153dc591c6b63578d9ec

If you don’t ask, how would somebody know that you want it:
https://github.com/jakevdp/mpld3/issues/312

Comments Off on I asked for an improvement to mpld3, and somebody did it!

Filed under dataviz, software engineering

Unhide a toolbar in MPLD3

Did you ever want to know how to unhide the toolbar in MPLD3? Here is how: http://stackoverflow.com/questions/29976625/unhide-toolbar-in-mpld3

Comments Off on Unhide a toolbar in MPLD3

Filed under dataviz, Uncategorized

Tables of Stacked Bars in mpl (but not mpld3)

Here is a little feature in Matplotlib that I never saw before: stacked bar plots with tables attached. Perhaps too ugly for my Iraq Mortality stacked bar charts, but definitely handy for exploratory work.

I learned about it because it doesn’t work in `mpld3`… just one more benefit of being part of an open-source project. It would be so cool to have a `mpld3` version with some interactivity included, since interactivity can address one pitfalls of the stacked bar chart, the challenge of comparing lengths with different baselines.

Comments Off on Tables of Stacked Bars in mpl (but not mpld3)

Filed under dataviz

Pretty bug in mpld3

It’s not quite d3-broke-and-made-art quality, but I like the plot in this bug report: https://github.com/jakevdp/mpld3/issues/274#issuecomment-68576519

Comments Off on Pretty bug in mpld3

Filed under dataviz, software engineering

IDV in Python: Retrieve Data From Dynamic mpld3 plot in python

Mpld3 questions show up on Stack Overflow from time to time, too, and they can get really informative answers if they pull in the javascript experts. This one got a comprehensive answer that was perhaps too expert, and so this follow up was an opportunity to show off my interactive plot call-out plugin yet again.

Comments Off on IDV in Python: Retrieve Data From Dynamic mpld3 plot in python

Filed under software engineering

Anyone want to fix things in mpld3?

People are actually using mpld3. It would be great if there was more progress addressing the many issues that this use has uncovered. Interested?

Thanks for your interest in this project. I think that all of these points can be addressed, but it would be helpful to have a minimal example of python code that generates the issue in point (1) reliably. The github issue tracker has discussions related to points (3) and (4), and something that might be related to point (1). For point (2), it would be great to have a specific example in mind also, so that we can be sure any solution reduces file size substantially without compromising graphically accuracy.

  1. https://github.com/jakevdp/mpld3/issues/226 https://github.com/jakevdp/mpld3/issues/250
  2. Would be good to add an issue: https://github.com/jakevdp/mpld3/issues/new
  3. https://github.com/jakevdp/mpld3/issues/247
  4. https://github.com/jakevdp/mpld3/issues/198

As far as when all of these issues will be addressed, that is a pitfall of certain open-source projects that you might already be familiar with from your work with [related project]… I suspect that each fix will require a few hours of debugging at least, with (2) being easiest and (4) being hardest. I have a long list of issues to address, and although I’m happy to put these on it, I never seem to make progress on any of them.

Pull requests are certainly welcome, and if you or your collaborators wants to make these improvements, the mpld3 project will be happy to incorporate them into the codebase.

–Abie

Comments Off on Anyone want to fix things in mpld3?

Filed under software engineering

IDV in Python: adding text callouts to a scatter plot interactively with mpld3

I’ve been pretty interested in the potential of interactive data visualization recently, especially ever since I saw the reaction that the Global Burden of Disease 2010 visualization tool, GBD Compare, received last year. And one promising technology for making this stuff routine is mpld3, a mashup of the Python plotting library matplotlib and the javascript visualization kernel d3. Have I mentioned this before?

The thing about interactive data visualization is that its not always clear what is useful because it excites my reptile brain, and what is useful for more logical reasons. But I was asking a colleague to add some callouts to a (non-interactive) figure recently when I realized that this is a chance for interactivity to be _obviously_ useful. These finishing touches on a graphic often take me tons of time, and using a command-line plotting program just can’t be the right way to do it. How about an mpld3 plugin that lets me add text callouts interactively? And when I’m done, it can “save” the callouts, by creating the necessary Python script to generate them again? Here it is, in a notebook.

Comments Off on IDV in Python: adding text callouts to a scatter plot interactively with mpld3

Filed under dataviz

IDV in Python: Interactive heatmap with Pandas and mpld3

I’ve been having a good time following the development of the mpld3 package, and I think it has a lot of potential for making interactive data visualization part of my regular workflow instead of that special something extra. A few weeks ago, an mpld3 user showed up with an interesting challenge, and solved their own problem quite well.

I finally got a chance to look at it today, and with a little spit-and-polish this could be something really useful for me.

ihm

Comments Off on IDV in Python: Interactive heatmap with Pandas and mpld3

Filed under dataviz, software engineering