Re: [Matplotlib-users] Shadows are really large in exported PNG file
A quick follow-up: if I export to a jpg file, I get the same huge shadow. If I export to a PDF file, the shadow looks much more like it does on the screen. > On Sep 3, 2015, at 1:07 PM, Richard Stanton <stan...@haas.berkeley.edu> wrote: > > I’m trying to create a pie chart for a presentation. If I turn on shadows, > they look fine on the screen (in an IPython notebook), but when I export the > file to a PNG file, the shadow is way larger, and looks pretty ugly. Is this > a bug? And is there a way to shrink the size of the shadow? > > Here’s some sample code that shows the problem: > > import matplotlib.pyplot as plt > numbers = [4380.0, 2474.0, 158] > explode=(0, 0, 0.5) > plt.pie(numbers, explode=explode,shadow=True) > plt.axis('equal') > plt.savefig(‘grap.png’, dpi=400) > > Thanks for any suggestions. > > By the way, I’m using Matplotlib version 1.4.3 with the Anaconda distribution > under OS X. > > Richard Stanton -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlibrc seems to be ignored from IPython notebook
I want to increase the default setting of saved matplotlib graphs, so I created a file ~/.matplotlib/matplotlibrc containing the line savefigdpi : 300 I then created a test notebook containing a single cell with the contents import numpy as np import matplotlib.pyplot as plt x = np.array([1,2,3]) y = np.array([4,5,6]) plt.plot(x,y) plt.savefig('d0.png') plt.savefig('d300.png',dpi=300) When I run this within the notebook, the two png files are created fine, but have different sizes. When I run the same code from the command line (after saving the same commands to a script file testplot.py), using ipython testplot.py the two graphs have the same size, as desired. Does matplotlib ignore the contents of ~/.matplotlib/matplotlibrc when called from an Ipython notebook? By the way, this is using matplotlib 1.2.0 and Ipython 0.13.2, if it makes any difference. Thanks for any help. Richard Stanton -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users