Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
On Sat, Nov 8, 2008 at 11:28 AM, Tom Kuiper [EMAIL PROTECTED] wrote: Dear Dato, On Monday I installed this package and the two associated packages (as they were then, anyway) from http://ftp.de.debian.org/debian/pool/main/m/matplotlib/ On Thursday I tried to save a figure to EPS format and got the errors below. Is there something else that needs to be updated? It seems to work for me. Could you please post here the full script that reproduces the error? Ondrej -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
Good morning, Ondrej. (I'm in Los Angeles.) Here is the script except that, for now, I've changed the file type to PNG. That works and I then convert it to EPS with Imagemagick's convert. The result is not publication quality but I can at least continue working. Checking back in my log I see that I did kuiper:/tmp# dpkg -i python-matplotlib-data_0.98.1-1+lenny3_all.deb (Reading database ... 199532 files and directories currently installed.) Preparing to replace python-matplotlib-data 0.98.1-1+lenny1.1 (using python-matplotlib-data_0.98.1-1+lenny3_all.deb) ...Unpacking replacement python-matplotlib-data ... Setting up python-matplotlib-data (0.98.1-1+lenny3) ... kuiper:/tmp# dpkg -i python-matplotlib_0.98.1-1+lenny3_i386.deb (Reading database ... 199532 files and directories currently installed.) Preparing to replace python-matplotlib 0.98.1-1+lenny3 (using python-matplotlib_ 0.98.1-1+lenny3_i386.deb) ... Unpacking replacement python-matplotlib ... Setting up python-matplotlib (0.98.1-1+lenny3) ... What package does the TTF to EPS/PS conversion? Best regards Tom Ondrej Certik wrote: On Sat, Nov 8, 2008 at 11:28 AM, Tom Kuiper [EMAIL PROTECTED] wrote: Dear Dato, On Monday I installed this package and the two associated packages (as they were then, anyway) from http://ftp.de.debian.org/debian/pool/main/m/matplotlib/ On Thursday I tried to save a figure to EPS format and got the errors below. Is there something else that needs to be updated? It seems to work for me. Could you please post here the full script that reproduces the error? Ondrej
Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
On Sat, Nov 8, 2008 at 7:17 PM, Kumar Appaiah [EMAIL PROTECTED] wrote: Dear Tom, On Sat, Nov 08, 2008 at 09:04:38AM -0800, Tom Kuiper wrote: What package does the TTF to EPS/PS conversion? Reading through your backtrace, I guess the function which fails is convert_ttf_to_ps. This function is defined in the matplotlib source file src/_ttconv.cpp, and the relevant portion which seems to fail is this: try { insert_ttfont( filename, output, (font_type_enum)fonttype, glyph_ids ); } catch (TTException e) { PyErr_SetString(PyExc_RuntimeError, e.getMessage()); which is fairly strange, since you should be having the fonts already. Could you please tell me if you are doing anything special in your .py file which causes some error in loading the EPS fonts? (not that I would still be able to help, but anyway...) I am attaching the file that Tom sent me in private and forgot to attach to the list. It supposedly fails for him, but it works for me. Ondrej #!/usr/bin/python2.4 from pylab import * def S(R): ratio = 0.3078*R return 1./(ratio - 1) def Tb(S,nLdv): if abs(S) 0.1: result = 1 else: result = 0.32*S*(1-exp(-0.85*nLdv/S)) if result 1e20: return 1e20 #print S, result return result vTb = vectorize(Tb) subplot(2,1,1) R = linspace(1.0,5,100) plot(R,S(R),label='extended source') plot(R,S((290.1/239.75)**2*R),label='point source') ylim(-20,5) xlabel(r'$290/239$') ylabel(r'$\mathcal{S}$') grid() legend(loc='lower right') subplot(2,1,2) #S = linspace(-.8,.4,100) S = logspace(-3,1.3) #print Tb(S,1) # plot(S, vTb(S,1) ) loglog(S,vTb(-S,1.),label=r'$\frac{nL}{\Delta v} = 1$') loglog(S,vTb(-S,10.),label=r'$\frac{nL}{\Delta v} = 10$') loglog(S,vTb(-S,100.),label=r'$\frac{nL}{\Delta v} = 100$') ylim(0,1e9) #xlim(-.8,.4) xlim(0.001,20) grid() xlabel(r'$-\mathcal{S}$') ylabel(r'$T_B$') legend(loc='upper left') savefig('S_vs_R.eps',papertype='letter') show()
Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
Ondrej Certik wrote: I am attaching the file that Tom sent me in private and forgot to attach to the list. It supposedly fails for him, but it works for me. I should point out that the first line #!/usr/bin/python2.4 was an attempt to see if python2.4 would work better but it doesn't. Generally, I run scripts from inside ipython so that line is irrelevant. Tom -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
Confirmed. I have the same error with your script (Yikes!). And, the error doesn't appear on the unstable version. So, it's time to do some bug-hunting! I'll get in touch with the matplotlib maintainers and see where the mistake could be, if I can't figure it out myself. For now, I suggest a workaround. Add this to the top of the code, you can add the following to force TeX use: rc('text', usetex=True) Please tell me if this helps. I shall probe further then. Thanks. Kumar -- Kumar Appaiah -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
On Sat, Nov 08, 2008 at 11:23:54AM -0800, Tom Kuiper wrote: For now, I suggest a workaround. Add this to the top of the code, you can add the following to force TeX use: rc('text', usetex=True) That works! Thanks you. Thanks for the quick response, Tom. I always use TeX fonts for the math stuff, so you might get away this time with using that. But there's some font conversion issue which I am really unable to figure out which caused the original problem. Since it works in the sid matplotlib, due to some change, I guess we have to hunt it. But I've drawn a blank, since I can't really spot the change which could have caused this. I can have a closer look later, unless someone else comes in before me. Thanks. Kumar -- Kumar Appaiah signature.asc Description: Digital signature
Re: python-matplotlib_0.98.1-1+lenny3_i386.deb
That works! Thanks you. Tom Kumar Appaiah wrote: Confirmed. I have the same error with your script (Yikes!). And, the error doesn't appear on the unstable version. So, it's time to do some bug-hunting! I'll get in touch with the matplotlib maintainers and see where the mistake could be, if I can't figure it out myself. For now, I suggest a workaround. Add this to the top of the code, you can add the following to force TeX use: rc('text', usetex=True) Please tell me if this helps. I shall probe further then.