gregsexton / ob-ipython

org-babel integration with Jupyter for evaluation of (Python by default) code blocks
739 stars 109 forks source link

Image resolution different from plt.show() and plt.savefig() #44

Closed Yevgnen closed 8 years ago

Yevgnen commented 8 years ago

Hi,

I have a specified 'matplotlibrc' file with the same settings of plt.show() and plt.savefig(). But when I C-c C-c on the code block, the resulting image has a very low resolution that different from I directly run the python code outside the org file. How can I solve this, namely make the output image inside org mode the same as plt.same() and plt.savefig()? Thanks !

Updated: I put

import matplotlib
print(matplotlib.matplotlib_fname())

in the org code block, which gives

~/.matplotlib/matplotlibrc'

I think matplotlib is using the same config as which I run the python outside a org file.

Yevgnen commented 8 years ago

Maybe not a ob-ipython issue.

ref: http://stackoverflow.com/questions/25412513/inline-images-have-low-quality