[Matplotlib-users] latex output problem
Hi all, I have absolutely no idea what the problem is. I'm running the actual enthought python version (on WinXP) which includes matplotlib version 0.87.3. The conversion of the dvi file to png does not work: dvipng -bg Transparent -D "200" -T tight -o "C:\temp\temp\.matplotlib\tex.cache\6ded4018a133b00dd5abd9e27ca15efa.png" "C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi" ... RuntimeError: dvipng was not able to process the flowing file: C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi Here is the full report generated by dvipng: This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson dvipng: Fatal error, bad -D parameter The path to the dvi file is correct. The strange thing is, that this commands works when I paste it into the windows command line! I hope someone can help me. Regards Wolfgang - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] latex output problem
> "Wolfgang" == Wolfgang <[EMAIL PROTECTED]> writes: Wolfgang> Hi all, I have absolutely no idea what the problem Wolfgang> is. I'm running the actual enthought python version (on Wolfgang> WinXP) which includes matplotlib version 0.87.3. Wolfgang> The conversion of the dvi file to png does not work: Wolfgang> dvipng -bg Transparent -D "200" -T tight -o Wolfgang> "C:\temp\temp\.matplotlib\tex.cache\6ded4018a133b00dd5abd9e27ca15efa.png" Wolfgang> "C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi" Wolfgang> ... RuntimeError: dvipng was not able to process the Wolfgang> flowing file: Wolfgang> C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi Wolfgang> Here is the full report generated by dvipng: Wolfgang> This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson Wolfgang> dvipng: Fatal error, bad -D parameter I don't understand why the 200 is being quoted in the -D flag, etc -D "200" The relavent bit of code in matplotlib.texmanager reads command = self.get_shell_cmd('cd "%s"' % self.texcache, 'dvipng -bg Transparent -D %s -T tight -o \ "%s" "%s" > "%s"'%(dpi, os.path.split(pngfile)[-1], os.path.split(dvifile)[-1], outfile)) WOlfgang, try playing around with this code in site-packages/matplotlib/texmanager.py (in the make_png function). Does this help command = self.get_shell_cmd('cd "%s"' % self.texcache, 'dvipng -bg Transparent -D %d -T tight -o \ "%s" "%s" > "%s"'%(int(dpi), os.path.split(pngfile)[-1], os.path.split(dvifile)[-1], outfile)) JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] latex output problem
Hello John, I had also to remove the quotationmarks from the png/dvi Filename command = 'dvipng -bg Transparent -D %s -T tight -o %s %s'%\ (dpi, pngfile, dvifile) Now it works fine! Thanks for the quick reply. Wolfgang John Hunter schrieb: >> "Wolfgang" == Wolfgang <[EMAIL PROTECTED]> writes: > > Wolfgang> Hi all, I have absolutely no idea what the problem > Wolfgang> is. I'm running the actual enthought python version (on > Wolfgang> WinXP) which includes matplotlib version 0.87.3. > > Wolfgang> The conversion of the dvi file to png does not work: > Wolfgang> dvipng -bg Transparent -D "200" -T tight -o > Wolfgang> > "C:\temp\temp\.matplotlib\tex.cache\6ded4018a133b00dd5abd9e27ca15efa.png" > Wolfgang> > "C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi" > > Wolfgang> ... RuntimeError: dvipng was not able to process the > Wolfgang> flowing file: > Wolfgang> > C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi > Wolfgang> Here is the full report generated by dvipng: > > Wolfgang> This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson > Wolfgang> dvipng: Fatal error, bad -D parameter > > I don't understand why the 200 is being quoted in the -D flag, etc > > -D "200" > > The relavent bit of code in matplotlib.texmanager reads > > command = self.get_shell_cmd('cd "%s"' % self.texcache, > 'dvipng -bg Transparent -D %s -T tight -o \ > "%s" "%s" > "%s"'%(dpi, os.path.split(pngfile)[-1], > os.path.split(dvifile)[-1], outfile)) > > WOlfgang, try playing around with this code in > site-packages/matplotlib/texmanager.py (in the make_png function). > Does this help > > command = self.get_shell_cmd('cd "%s"' % self.texcache, > 'dvipng -bg Transparent -D %d -T tight -o \ > "%s" "%s" > "%s"'%(int(dpi), > os.path.split(pngfile)[-1], > os.path.split(dvifile)[-1], outfile)) > > JDH > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] latex output problem
> "Wolfgang" == Wolfgang <[EMAIL PROTECTED]> writes: Wolfgang> Hello John, I had also to remove the quotationmarks from Wolfgang> the png/dvi Filename command = 'dvipng -bg Transparent Wolfgang> -D %s -T tight -o %s %s'%\ (dpi, pngfile, dvifile) Wolfgang> Now it works fine! Thanks for the quick reply. But it's still not clear where the quotemarks on the 200 came from in the first place, as they ere not in the src code, at least in my version. What version are you working with? JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] crash on MacOS X
Russell E Owen wrote: >> well, I didnt' 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). Then this could be it. In general, they should co-exist just fine, but do know someone else has weird crashing problems when they were mixed with MPL (and GDAL, in his case). Both numpy and Numeric, and numarray have a lot of extension code that shares names, etc. who knows what problem that can cause? > I > hope to switch to numpy for everything once the dust settles, good plan, and it's getting close. The API should be stable now. The sooner the better, I think. You'll be a lot more help with bugs or potential bugs like this one. >>> I also tried setting numerix to Numeric and it still happens. Darn. > I don't have wx or gtk installed, so no easy way to test those backends. if you install the mpkg on pythonmac.org/packages, wx should work. that's pretty easy. > It does not crash with plain old Agg (but of course I don't see any plot). Does it save a png successfully? > I'll be happy to try the "non-agg TK back-end" if you can tell me what > setting to use for it. hmm. I just assumed it was there, but I can't find it either. > 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. I meant that tongue-in-cheek -- we all have our reasons, and I know you've been using TK for a good long time now. > Sometimes I wish I'd > used Java, even though the I strongly prefer Python, just to get a > standard GUI. which one would that be? AWT? Swing? SWT?, or for that matter, wxJAVA. > I'll try bulding matplotlib from source, just to see if there might be > some quirk about the installer package. It's always worth a shot! -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] wxmsw26uh_vc.dll and matplotlib 0.87
Hello Charlie, I tried the solution you suggested below to get py2exe working and get rid of the "no such file wxmsw26uh_vc.dll" message when trying to run the compiled .exe 1. I removed the _wxagg.pyd file from matplotlib/backends (although I was loathe to do so as my guess is that this will make plotting slower?) 2. I removed the exclusion on the wxmsw26uh_vc.dll in the setup file Now I can compile to an .exe but the application starts briefly, but stops and closes the output window before I can see anything. It doesn't write anything to the .log file. I'm running XP, Python 2.4, wxPython 2.6.3.3-py4 and MPL 87.5 Has anybody else tried this solution and got it to work? Thanks for any help you can provide. - Daniel P.S. If it's relevant, my setup.py is below... # For py2exe only """ Setup.py Create .exe for VizTool. This code was provided on the Matploblib users mailinglist Run with the following command (use py2exe 0.6.2 or higher) python.exe -OO setup.py py2exe -b 3 -c -p numarray,pytz -e numpy """ import os from distutils.core import setup import py2exe import glob import matplotlib #Following ops assignment pulled from Py2Exe WIKI : http://starship.python.net/crew/theller/moin.cgi/MatPlotLib opts = { 'py2exe': { 'compressed': 1, 'optimize': 2, 'packages': ['encodings', 'matplotlib.backends', 'pytz', 'matplotlib.numerix' ], 'includes': 'matplotlib.numerix.random_array', 'excludes': ['_gtkagg', '_tkagg'], 'dll_excludes': ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll', 'tk84.dll'] } } setup( version = '0.0.1', windows = ['VizToolApp.py'], data_files = [('conf',['conf/GraphStyles.ini']), ('',['matplotlibrc']), matplotlib.get_py2exe_datafiles()], options=opts, ) - 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
In article <[EMAIL PROTECTED]>, Christopher Barker <[EMAIL PROTECTED]> wrote: > Russell E Owen wrote: > >> well, I didnt' 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). > > Then this could be it. In general, they should co-exist just fine, but > do know someone else has weird crashing problems when they were mixed > with MPL (and GDAL, in his case). Both numpy and Numeric, and numarray > have a lot of extension code that shares names, etc. who knows what > problem that can cause? > > > I > > hope to switch to numpy for everything once the dust settles, > > good plan, and it's getting close. The API should be stable now. The > sooner the better, I think. You'll be a lot more help with bugs or > potential bugs like this one. I look forward to the unification, but unfortunately I don't think it will help with this crash (unless the very fact that the numarray and/or Numeric are installed but not loaded can cause problems). I see the crash even with this trivial script: $ python >>> from pylab import * >>> plot([1,2,3,4]) >>> show() boom! matplotlib 0.87.5 crashes with ~/.matplotlib/matplotlibrc set to use numarray (1.5.1), Numeric or numpy (1.0b5). > > I don't have wx or gtk installed, so no easy way to test those backends. > > if you install the mpkg on pythonmac.org/packages, wx should work. > that's pretty easy. Fair enough. I installed wxPython (2.6) and the above scripts works fine (as long as interactive is false). > > It does not crash with plain old Agg (but of course I don't see any plot). > > Does it save a png successfully? I can try this if you think it will help. It appears to be a lot more work than just slapping up a plot using pylab so I've not tried it yet. I also failed to build matplotlib from source. I had all the prerequisites in /usr/local (and I reinstalled freetype 2.2.1 to be sure, since the version shown in /usr/local/lib has no resemblance to the source version). During the build I see these warnings (but no errors): /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /usr/local/lib/libpng.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) and after installation, importation of pylab fails as follows: >>> from pylab import * Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac kages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac kages/matplotlib/pylab.py", line 200, in ? from axes import Axes, PolarAxes File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac kages/matplotlib/axes.py", line 15, in ? from axis import XAxis, YAxis File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac kages/matplotlib/axis.py", line 25, in ? from font_manager import FontProperties File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac kages/matplotlib/font_manager.py", line 39, in ? from matplotlib import ft2font ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pack ages/matplotlib/ft2font.so: Symbol not found: _FMDisposeFontFamilyIterator Referenced from: /usr/local/lib/libfreetype.6.dylib Expected in: flat namespace -- 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