postscript output?

John Hunter wrote:

“Juraj” == Juraj Krempasky <juraj.krempasky@…33…>
writes:
[ Standard response: please post questions to the mailing list

when possible since others can benefit from the discussion,
and

provide help

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

]

I suppose the above matplotlib.use(‘GTK’)
should be

> matplotlib.use('PS'), isn't it?

Yes, that’s correct. Thanks for catching it.

But then I got the following message:

Error: Could not find any AFM files; please
set AFMPATH to

> point to some readable adobe font metric

files

Matplotlib comes with a set of AFM files. Did you do a normal

python setup.py install

with matplotlib? If so, distutils should put the files in a place

where matplotlib can find them even w/o setting AFMPATH (eg,

/usr/local/share/matplotlib or /usr/share/matplotlib). If they
are

not there, then my guess is something went funny with your install.

These files reside in the src distribution in the dir

matplotlib/fonts/afm, so you can get them there and set AFMPATH

accordingly.

The easiest way to find the AFM fonts on your system is to do

locate afm | less

and see which dirs pop up. On my system, dirs include

/usr/share/fonts/default/Type1, /usr/share/fonts/afms/adobe, etc…

They you can set your AFMPATH to point to these dirs.

Any idea where there files are on Linux RH7.3.
The size is

> then defined again like savefig('xx.ps',dpi=60)?

You don’t need to set the DPI for a postscript file since postscript

is scalable. The DPI is determined by your output device, eg,
a

1200x1200 DPI printer. This parameter is ignored by matplotlib
on the

PS backend.

Good luck,

John Hunter

Hello,

the afm files were missing probably because I made an rpm package with
python setup.py which I installed (I didn’t do the setup.py install). Nevertheless
the PS output by setting the AFMPATH works fine. I really appreciate the
font management with matplotlib. However, for making plots to be included
in Latex I’d like to have the possibility to scale also the axes fonts.
For example Gnuplot knows a command “set size” which then scales whole
plot by leaving all fonts the same - and this makes then small plots look
good. In matplotlib I can scale text, but I don’t know how to scale
axes fonts along with axis labels. Is it possible?

Best regards


<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

-- 
                         _____
      Swiss             /    /        juraj.krempasky@...33...
     _/_/_/  _/   _/_/_/    /____    Experimental Division
    _/      _/   _/   Source    /   Paul Scherrer Institute 
     _/_/  _/     _/_/     ____/  CH-5232 Villigen-PSI
        _/_/Light    _/   /      Tel: ++41 56 310 5131
 _/_/_/_/_/_/_/ _/_/_/___/      Fax: ++41 56 310 3151