xlabels / ylabels as (non-math) text for pstoedit

Hey everyone,

this is more a how-to / feature request than a question... Normally, my
workflow for embedding images in LaTeX is as follows:

1) produce ps-file
2) use pstoedit (xfig) to separate text/math (LaTeX-typesettable) from
the image
3) save as pdf_t and pdf, respectively
4) \input this in the LaTeX document -- pdflatex will then set the text
at every compilation.

This has the advantage that I can change fonts etc without having to
redo all the figures.

I was trying to do so with matplotlib 0.98.3 and pstoedit 3.45 on a
64bit Ubuntu 8.10. I followed the instructions in the matplotlib
cookbook but kept experiencing problems when calling pstoedit [1], the
xlabels and ylabels were somehow converted to Courier but not put in the
"text" part, "." would become ":" and so on.

Solution brought this thread
http://www.nabble.com/Switching-between-different-font-settings-ts21279388.html
which suggested using OldScalarFormatter (thanks at this point also from
my side, Jouni) -- which works, see attached example.

So much for the "how-to-part" -- obviously, my suggestion is now to not
force users to have math-labels. I have to admit that I am not aware of
the drawbacks of OldScalarFormatter, but alone the name makes me think
that it might be not the best solution...

Thanks and best regards,
Sebastian.

P.S.: why actually does
ax.yaxis.get_ticklabels()[1].get_text()
return an empty string when called before savefig?

P.P.S.: I expect to be offline several days, so please excuse me if I
won't be answering timely.

[1]
pstoedit: version 3.45 / DLL interface 108 (build Jun 17 2008 - release
build - g++ 4.3.1) : Copyright (C) 1993 - 2007 Wolfgang Glunz
Warning: Level 2 version of image and imagemask not supported for this
backend (due to lack of support for bitmaps on intermediate files)
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font MCSZLR+CMMI12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font MCSZLR+CMMI12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font MCSZLR+CMMI12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font MCSZLR+CMMI12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.
Warning, unsupported font MCSZLR+CMMI12, using Courier instead.
Warning, unsupported font YBFHZA+CMR12, using Courier instead.

tex_demo.py (746 Bytes)