From: Norbert N. <Nor...@gm...> - 2004-12-02 09:12:25
|
Hi there, probably a trivial question, but somehow, I'm stuck anyway: I have the following script: ---------- #!/usr/bin/env python import matplotlib.matlab ... do some data preparation ... plot(something) show() savefig("output.eps") ---------- If I call this script with the -dGtkAgg option, it displays the plot on screen and saves an empty eps file. If I call it with -dPS, it displays nothing and outputs the correct eps - so far everything as I would expect it. Up to now, I just used the -dGtkAgg backend (as default) to get an impression about the plots and then ran the script again to create the .eps. Now, I would like the script to do both in one run: display the plot on screen, and save it to disk at the same time. Somehow I have not achieved doing so. My first idea was to place matplotlib.use('PS') right before the savefig, but that does not change anything and still writes an empty .eps file. What should I do? Thanks, Norbert -- _________________________________________Norbert Nemec Bernhardstr. 2 ... D-93053 Regensburg Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199 eMail: <No...@Ne...> |