Re: [Matplotlib-users] saving displayed fig as ps fails
On 20/09/06, John Hunter <[EMAIL PROTECTED]> wrote: > > "George" == George Nurser <[EMAIL PROTECTED]> writes: > > George> SVN revision 2774, linux 64-bit, TkAgg, NumPy. If I > George> create a figure on the screen (TkAgg back end), when I try > George> to save it as .ps, the resulting file displays and prints > George> as blank. However I can save it as .eps (or png) > George> perfectly well. > > tkagg passes its printing off to agg, which passes both *.ps and *.eps > to backend_ps with no further processing. So if there is a problem, > it should show up on a pure PS backend, eg > > import matplotlib > matplotlib.use('PS') > from pylab import figure, show > fig = figure() > ax = fig.add_subplot(111) > ax.plot([1,2,3]) > fig.savefig('test.ps') > fig.savefig('test.eps') > > Is anyone seeing problems with this? John, I tried this and, again, the ps fails but eps is OK. > > There is, however, a known bug when using tkagg from pylab, after you > click the save button pylab loses the current figure. This appears to > be a tkinter bug and I reported it on python-list and go no response. > If this is the cause of your problem, it is not about PS vs EPS vs > PNG, but about which filetype you try and save first. The first one > would work, and subsequent ones would fail. This certainly wasn't the problem. Originally I tried saving png first (OK), ps (not OK), eps (third time lucky, OK.) Thanks for responding so quickly. George. - 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
Re: [Matplotlib-users] crash on MacOS X
At 3:12 PM -0700 9/15/06, Christopher Barker wrote: >Russell E Owen wrote: >>Interesting idea. I'm not sure I'd know how to use more than one >>numerix option at once, > >well, I dint' mean more than one numerix option, exactly. What I >meant was that MPL is using numarray, but another module you've >imported is using Numeric (or numpy or whatever). Ah. I can guarantee that's happening. Some of my code uses Numeric (due to high speed on short arrays) and some uses numarray (because I started using it for all new code when it looked like it would take over). I hope to switch to numpy for everything once the dust settles, but I don't want to force my users to all move at once (a lot of them are on unix and will have to manually install numpy -- no big deal, but I get complaints every time I require a new package). > > but it did inspire me to try a few things: > >>backend : TkAgg >>numerix : numarray >>interactive : True >>and the crash still happens: >>from pylab import * >>plot([1,2,3,4]) > >>I also tried setting numerix to Numeric and it still happens. > >Does it happen with wxAgg? or just plain ol Agg? also try the >non-agg TK back-end. I don't have wx or gtk installed, so no easy way to test those backends. It does not crash with plain old Agg (but of course I don't see any plot). I'll be happy to try the "non-agg TK back-end" if you can tell me what setting to use for it. I didn't see it in the matplotlibrc's list of options (but WXAgg is also missing from that particular list), nor on the "Which backend should I use?" page. >If not, then you've apparently found a tkAgg bug. > >TK has always been a bit of a second-class citizen on the Mac -- why >haven't you switched to wx yet? ;-) I started this project several years ago and at the time Tcl/Tk was the only game in town for Mac+unix+windows cross-platform support. Admittedly the Mac support was poor, but it has gotten much better, and I like Tkinter pretty well overall. It would be a major job to switch now and I doubt I can justify the expense and time. Sometimes I wish I'd used Java, even though the I strongly prefer Python, just to get a standard GUI. I'll try bulding matplotlib from source, just to see if there might be some quirk about the installer package. -- Russell - 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
[Matplotlib-users] problems with TkAgg on Linux
Title: problems with TkAgg on Linux Hi I am installing matplotlib-0.87.5 on a red hat linux system with Python 2.4. I have all the listed packages installed on my linux. I have reinstalled it several times but it is still failing with TkAgg. I have removed and reinstalled all the components several times, but it still fails. During the build the only messages that seemed unusual relate to /usr/include/features.h:150:1: warning: this is the location of the previous definition When I install matplotlib and test it with python subplot_demo.py -dagg it works fine python subplot_demo.py -dTkAgg it fails Unfortunatly I need the TkAgg backend working. msg. File "subplot_demo.py", line 2, in ? from pylab import * File "/home/arfras/local/cdat/lib/python2.4/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/pylab.py", line 219, in ? new_figure_manager, draw_if_interactive, show = pylab_setup() File "/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/__init__.py", line 23, in pylab_setup globals(),locals(),[backend_name]) File "/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py", line 8, in ? import tkagg # Paint image to Tk photo blitter extension File "/home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/tkagg.py", line 1, in ? import _tkagg ImportError: /home/arfras/local/cdat/lib/python2.4/site-packages/matplotlib/backends/_tkagg.so: undefined symbol: XSetInputFocus Any ideas? Andrea - 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