Werner Hoch writes: > What is Tex output? Do you mean postscript or eps? > > > sh: line 1: 11319 Segmentation fault gs -dBATCH -dNOPAUSE > > -r6000 -sDEVICE=pswrite -sPAPERSIZE=letter > > -sOutputFile="/tmp/ef684d47fbac423478eccceef602c8ca.ps" > > "/tmp/ef684d47fbac423478eccceef602c8ca" > > >"/tmp/ef684d47fbac423478eccceef602c8ca.output"
OK, so I have updated to the latest RPMs and investigated a bit further. The gs segfault occurs when setting "usetex=True" AND trying to save to an eps figure. Demonstration: take tex_demo.py from the examples collection on the matplotlib site. It runs OK. Now change savefig('tex_demo') to savefig('tex_demo.eps'). Boom. Probably a bug with the Suse gs rather than matplotlib, but pretty annoying anyway because one would like to produce eps rather than bitmapped figures for publication quality images. > Can you please provide some informations about your setup? > OS = SuSE 10.2 > arch = i586 python shell = ipython or even the standard python interpreter > backend your trying to use (Agg is default, set it to TkAgg if you like > to use matplotlib interactively) > interactive value in matplotlibrc OK, here is the problem. With the latest RPM I get [EMAIL PROTECTED]:~/Desktop/examples> ipython -pylab [Lots of backtrace...] ImportError: No module named wx Missing dependency? In any case, after setting the backend to GTKAgg in matplotlibrc, everything works. I believe that's also the default in the Fedora RPM. The following tests with GTKAgg backend setting: > Minimum Testcode for matplotlib: > ------- > from pylab import * > > a = arange(0,10,0.01) > plot(a, sin(a)) > grid() > savefig("abc.png") > ------- > Does it work? Yes. > Testcode for postscript: > ------- > from pylab import * > > a = arange(0,10,0.01) > plot(a, sin(a)) > grid() > savefig("abc.ps") > ------- > Does it work? Yes. OK, so boiled the problem with usetex=True down to the following pair of working vs. nonworking code. Wierd. File working.py: ================ #!/usr/bin/env python from pylab import * rc('text', usetex=True) a = arange(0,10,0.01) plot(a, sin(a)) grid() savefig("abc.ps") show() File nonworking.py: =================== #!/usr/bin/env python from pylab import * rc('text', usetex=True) a = arange(0,10,0.01) plot(a, sin(a)+2) savefig("abc.ps") show() > After changing the settings for the backend and interactive mode. > Does the following code produce a plot when entered into a shell? > --------- > from pylab import * > plot([1,2,3,3,2,3]) > --------- As descibed above, changing backend is necessary to do anything... Did not systematically try all the backends. Would be nice if the default was working. > Can you provide the version of your Fedora and the Version of the > matplotlib package? > It would be much easier to track the differences and fix the package. http://mirrors.usc.edu/pub/linux/distributions/fedora/extras/6/SRPMS/python-matplotlib-0.87.7-3.fc6.src.rpm Thanks a lot, Marcel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users