I found that my earlier problem in which matplotlib failed when making the font database (in loading pylab the first time) came from a VT102 font in my ~/Library/Fonts (on OSx 10.3). Moving the font to a directory off the font path allowed successful loading.
Next problem .... interactive running, using the TkAgg backend, from ipython -pylab draws pretty graphs -- very impressive -- and I can save to .png fine. But saving to postscript gives a very large file, which moreover seems to be corrupted. Editing the .matplotlibrc file to use the PS backend directly & starting up ipython again gives the same very large, corrupt, PS file.
matplotlib 0.80, ipython 0.6.13 + zlib, libpng, tk_inter, freetype 2.1.9, wx-2.6-mac-unicode, standard Apple Python 2.3, updated to MacPython, Numeric. OS X 10.3.9.
-George Nurser.
E.g. (from ipython)
In [1]: dt = 0.01
In [2]: t = arange(0,10,dt)
In [3]: s = sin(t)
In [4]: subplot(211)
Out[4]: <matplotlib.axes.Subplot instance at 0x3fa8af8>
In [5]: plot(t,s)
Out[5]: [<matplotlib.lines.Line2D instance at 0x3fb73f0>]
In [6]: c = cos(t)
In [7]: subplot(212)
Out[7]: <matplotlib.axes.Subplot instance at 0x3fb7f30>
In [8]: plot(t,c)
Out[8]: [<matplotlib.lines.Line2D instance at 0x3fc0ee0>]
... draws 2 subplots fine.
In [9]: savefig('/Users/agn/sin.png')
... produces 28kB .png file
In [10]: savefig('/Users/agn/sin.ps')
... produces 4.7 MB ps file.
Running
ps2pdf sin.ps
fails ... something to do with Lucida Grande
Error: /invalidfont in -dict-
Operand stack:
LucidaGrande --dict:10/14(L)-- Font LucidaGrande --dict:10/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 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:1111/1686(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)-- --dict:6/7(L)-- --dict:17/17(ro)(G)--
Current allocation mode is local
Last OS error: 2
Current file position is 4703628
AFPL Ghostscript 8.13: Unrecoverable error, exit code 1
Segmentation fault