On 05/08/2011 08:58 AM, Kaushik Kalyanaraman wrote:
> Dear List,
>
> I use Matplotlib bundled with the Enthought Python Distribution (EPD) (both 
> 32-bit and 64-bit versions). After a recent update, I find that my Python 
> code (run either in a iPython shell or in bash shell) crashes while 
> attempting to save figures to pdf files using savefig(). However, saving to 
> other formats (png, ps, eps or svg) works fine. The error message echoed to 
> the terminal are "Bus error" with 32-bit EPD and "Abort trap" with 64-bit 
> EPD. Also, converting to pdf from one of the other four formats using *nix 
> utilities like convert or ps2pdf go through fine (prompting to suspect that 
> savefig has a bug). Unfortunately, in a short time, by looking at pyplot.py, 
> I couldn't determine what could be causing this. Therefore, it would be 
> really helpful if list members can provide any hints to fix this. I need to 
> save a bunch of figures from existing code, and it would be great if I could 
> do so without having to modify all savefig statements; additionally, I would 
> prefer not to 
wr
>   ite a shell script to perform the conversions to pdf considering the 
> different directories that my figures are saved to.
>
> Also, a few searches using google did not throw up anything useful (although 
> one relevant list archive suggested that if EPD alone is installed on a Mac, 
> this error shouldn't be seen. Since this is the case for me, it didn't 
> help.). The following are my specifications:
>
> Platform: Mac OS X 10.6.7
> Python version: 2.7.1
> Matplotlib version: 1.0.1
> EPD versions: 7.0-2 (both 32-bit and 64-bit)
>
> (Should I also post this to matplotlib-devel ?)
Probably not necessary; I think most of us on -devel read -users, and 
other people on -users may have useful insight and testing to contribute.

The pdf backend is not that different from the ps and svg backends, at 
least superficially--all of them are just python code that write 
files--so it is not obvious why it would cause the sort of problem that 
is usually associated with broken extension code.

Do you see the problem with any plot at all? E.g.,

import matplotlib
matplotlib.use("pdf")
import matplotlib.pyplot as plt
plt.plot([1,2])
plt.savefig("test.pdf")

My guess is that somehow something is getting confused between the two 
EPD versions, or something got confused during the update.

Can you eliminate all traces of EPD, and then just cleanly install one 
version, and see if the problem still appears?

Eric

>
> Thanks and Regards,
> Kaushik Kalyanaraman
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to