This project has moved and is read-only. For the latest updates, please go here.

Inline plots - low resolution in interactive mode (IPython)

Nov 22, 2013 at 9:30 PM
Hi All,

First of all, let me congratulate you guys on a fantastic plugin for VS. Out of all the Python IDE's I have looked at, this by far the best. Now on to my question...

I have PTVS 2.0 installed in VS 2013 and everything works perfectly fine. However, when I display a plot inline via the interactive window they always seem to come out pixelated/low res.

If I switch the interactive mode to "IPython w/o Pylab" the image pops up in an external window and look perfect.

Does anyone else experience this? Is there anyway to fix these pixelated plots inline? Is it possible to make them look like the plots in the external window? Although increasing the figsize() improves the image, it's not prefect and I would still have to find the correct size using trial and error for each plot separately.

btw I'm totally new to python; been playing around with it for a day or so.

Thanks for your help,

Nov 22, 2013 at 11:24 PM
thx hailorium!

please check this response on S.O. to see if it works for you. pls let us know & we'll update the docs as well:

Nov 23, 2013 at 6:41 PM
Hi Ptools,

Thanks for the link. I found that I didn't have a file called I created a default profile in the interactive window by typing "!ipython profile create". However, any changes that I make to the file doesn't seem to take affect in VS when I press shift+alt+F5. I find this quite odd considering the changes do take effect when I use ipython via the browser (ipython notebook --pylab=inline). Using the link that you posted, I managed to improve the image by adding the following line in the editor window at the top:

pylab.rcParams['savefig.dpi'] = 300

Although this improves the plot, the quality is still not as good as IPython in the browser. It also means that I have to include this line every time. I've noticed that the inline images are in png format, which I suspect is the problem. Is it possible to change the format to svg?


Nov 25, 2013 at 5:06 PM
You may want to make the change in The interactive window is not the notebook, and so it won't be loading the notebook's configuration file.

It's not currently possible to change the format to SVG, mostly because we don't have support for rendering it. While it isn't impossible for us to do, it also isn't our highest priority right now. I've created a feature request for this that you can vote on.
Nov 26, 2013 at 11:20 PM
Thank you Zooba, those changes worked.

Although I understand including this feature wouldn't be the highest priority at the moment, I appreciate you creating a feature request for it.