matplotlib in IronPython

Aug 3, 2011 at 9:18 PM


I managed to get numpy and scipy working in IronPython. Now I am wondering, is there some easy way to run matplotlib from ironpython as well?



Aug 5, 2011 at 3:20 AM


hi david,


Since you're an IronPython users, I'd love to get your feedback on NumPy/SciPy for .Net ...



Aug 5, 2011 at 6:09 PM

Not much feedback so far, other than that the setup should be much easier, either just include everything in the PTVS setup or have a nuget or something.

Really all I want is some REPL console inside VS to drive my more complicated model in C# and plot stuff, maybe sometimes do some stats with the model output.

So, mainly still trying to figure out whether I can get matplotlib to run...



Aug 5, 2011 at 6:48 PM

ok, thanks david.


if you primarily work w IronPython & C# and want to do some Viz, you might want to check out Sho as well.  For 1.0 we're trying to integrate it into PTVS (at the REPL level) as well, TBD.


Aug 5, 2011 at 7:18 PM

I like Sho, but it doesn't have 3d plots, which is kind of limiting...

It would be great to have the Sho shell inside PTVS. I love features like paste from Excel etc. Ideally I'd like to be able to use both the Sho libraries and the NumPySciPy AND matplotlib from a Sho console running inside VS. If we then had some converters to convert sho matrices to numpy and vice versa, things would still be a bit clusmy, but at least one could use the functionality of both sho and numpy in one environment.

In general, I take it from your comments that matplotlib can't be called from IronPython at this point?



Aug 5, 2011 at 7:32 PM


I know there have been attempts at doing that, but i certainly havent tried it... perhaps dino knows more.  here's one from voidspace:

i would also ask on the IronPython mailing list -- i'm sure someone there might know.



Aug 6, 2011 at 4:51 PM

My understanding is it's not possible at the moment -- without somebody dedicating a lot of work to it. My understanding is most of the matplotlib "backends" are based on GTK. Someone wrote a backend for native OSX rendering, so I assume it's possible. A good description of backends is here: 


I'd love to see it also - for the exact same purposes...  drive more complicated models in C#. 


If I can package those scripts and visualizations for customers, etc. -- all the better.


For what it's worth - I plan to do some work to bind Infragistics Data Visualization kit to numpy... but I don't think I can share it (and it would be of little use to most people -- with license cost, etc.)