PTVS plotting pandas Dataframes and Series with matplotlib in python debug interactive

Dec 12, 2014 at 2:56 PM
Edited Dec 12, 2014 at 2:56 PM
Hi, [I've cross-posted this to stackexchange since I'm not sure which forum is more popular.]

Is it possible to plot pandas objects inside the PTVS interactive debugger? Is it possible to save plots to disc as jpeg's?

I think I was able to do this when I first started using PTVS (last year, its awesome by the way!) but I just tried again and I dont get any plots appearing. I cant remember if I had to do something special to get this to work and from doing some google searches I get a confusing picture of the current best practice in this regard.

I want to be able to plot diagrams from my debug interactive window, similar to what is shown on this pandas tutorial.

Is this possible?

Visual Studio Professional 2013 update 4 (latest I think)
PTVS 2.1.21008.00 (latest I think)

All help is greatly appreciated.


edit: here's the stackexchange post
Dec 12, 2014 at 6:04 PM
Currently this isn't possible while debugging a project, but we're working on that for our next release.

Right now, you can do all of this in a regular Interactive Window that's had IPython support enabled (see these docs)
Marked as answer by jasonrennie on 12/14/2014 at 10:35 AM
Dec 12, 2014 at 7:30 PM
Edited Dec 12, 2014 at 11:05 PM
no problem - I thought this might be the case.

I figured out a way to get something useable (in case anyone else finds this post)
for col in columns:
    myDataframe[col].hist(bins = 50, alpha = 0.5, color='g', log=True)
    myDataframe2[col].hist(bins = 50, alpha = 0.5, color='b', log=True)
    myDataframe3[col].hist(bins = 50, color='r', log=True, histtype="step")
    f.savefig("Z:/GNB/charts/__" + str(i) + "__col_" + col + ".png")
This draws lots of charts and saves them out as png files. (And it works from the Python Debug Interactive window)

Thanks for your help :)