PostScript Output Greek to Me
QUESTION: OK, I'm not using Greek characters anywhere in my IDL code, and my PostScript output looks like the figure below, all Greek titles. This is not what I see in my graphics window at all. What in the world is going on!?
Normal characters are replaced by Greek characters in IDL 8.3 PostScript output. |
ANSWER: Yes, this is a bug that was introduced into the direct graphics PostScript driver in IDL 8.3, probably when they fixed the bug in IDL 8.2 that caused a dot to replace the X in exponential notation in PostScript output. In any case, the problem is reportedly fixed in IDL 8.4, which hasn't been released at the time I am writing this article.
The problem presents itself in any direct graphics output (e.g, a Plot or cgPlot command) that produces exponential numbers on either the X or Y axis. If exponential numbers are used, the default font gets stuck in the Greek font mode.
There are two ways to work around the problem. One way it to simply use True-Type fonts in your PostScript output.
cgPS_Open, 'myfile.ps', FONT=1, TT_FONT='Times' cgPlot, (Findgen(11)+1)*1e4, XTitle='Some Text', YTitle='More Text' cgPS_Close
The second way to to add a "!3" to the text you want displayed on the axes.
cgPS_Open, 'myfile.ps' cgPlot, (Findgen(11)+1)*1e4, XTitle='!3Some Text', YTitle='!3More Text' cgPS_Close
Version of IDL used to prepare this article: IDL 8.3.