Hi,

This seems to be a machine- or OS-dependent problem.  On my Dell laptop 
running Gentoo, the .eps file is created ok and I can view it with 
display (ImageMagick) and evince, and make it into pdf using ps2pdf.

 From your error message, it appears to be font-related.  Do you have 
the same problem with a smaller graph, say replacing 40000 by 4 and 
20000 by 2?  I'm asking because when I look at the file I get with these 
options, about 90% of it is just embedding the font, which on my system 
is Verdana.

The webpage for matplotlib has something about missing fonts, see
        http://matplotlib.sourceforge.net/faq.html#FONTMISSING
They suggest a fix, which might be worth trying.

Best,
Alex



David Roe wrote:
> Hey all,
> I ran into a problem saving a graph to postscript recently.  Here's 
> what I did:
>
> plot.options['plot_division'] = 40000
> plot.options['plot_points'] = 20000
> P=plot(sin(5/(x)), x,0,1)
> P.save('filename.eps', xmin = -.25, xmax = 1)
>
> Attempting to open the resulting file on my MacBook Pro with either 
> Preview or ps2pdf leads to errors (I've pasted in the error from 
> ps2pdf at the end of this e-mail in case it's useful to anyone).
> Similar problems arise with .ps, but .png appears to work fine.
>
> David
>
>
>
>
>
>
>
> Error: /invalidfont in -dict-
> Operand stack:
>    LucidaGrande   --dict:11/14(L)--   Font   LucidaGrande   
> --dict:11/14(L)--   LucidaGrande
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--   
> --nostringval--   2   %stopped_push   --nostringval--   
> --nostringval--   --nostringval--   false   1   %stopped_push   1   
> 3   %oparray_pop   1   3   %oparray_pop   --nostringval--   1   3   
> %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--   
> --nostringval--   --nostringval--   2   %stopped_push   
> --nostringval--   2   4   %oparray_pop   3   4   %oparray_pop   
> --nostringval--   --nostringval--   --nostringval--   7   5   
> %oparray_pop   --nostringval--   7   5   %oparray_pop
> Dictionary stack:
>    --dict:1120/1686(ro)(G)--   --dict:0/20(G)--   --dict:75/200(L)--   
> --dict:6/7(L)--   --dict:17/17(ro)(G)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 4613603
> AFPL Ghostscript 8.51: Unrecoverable error, exit code 1
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to