comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: problems printing labels on graphs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: problems printing labels on graphs [message #14647 is a reply to message #14644] Tue, 16 March 1999 00:00 Go to previous messageGo to previous message
Stu is currently offline  Stu
Messages: 5
Registered: March 1999
Junior Member
David Fanning wrote:

> R.Bauer (R.Bauer@fz-juelich.de ) writes:
>
>>
>>
>> Stu wrote:
>>
>>> hello,
>>>
>>>> I have written an IDL procedure for displaying some data I have, this
>>>> basically consists of displaying a grey-scale image (using TV), and then
>>>> plotting a line graph directly below this image using PLOT. This data can
>>>> be displayed on the screen or written to a PS or EPS file. The procedure
>>>> also has the ability to change the type of font used (e.g. vector fonts,
>>>> true type fonts, or hardware/device fonts {e.g. postscript}), and by using
>>>> TITLE, SUBTITLE, XTITLE, and YTITLE, titles can be added to the axes and
>>>> various parts of the plot.
>>>>
>>>> The procedure works correctly when displaying data to the screen, all the
>>>> labels are printed correctly and the correct fonts are displayed. When
>>>> writing to a file, the titles are only displayed when the procedure is
>>>> called for the first time. I have to quit IDL and restart it each time in
>>>> order for the titles to be printed on the plot. Note: this only seems to
>>>> apply to vector and true type fonts, it is not necessary to quit each time
>>>> when using postscript fonts - although the titles are printed each time,
>>>> they're not printed in the correct place.
>>>>
>>> Anyone any ideas?
>>> cheers,
>>> Stu
>>
>> Did you close the device by device ,/close
>
> Oh, good idea! :-)
>
> This is clearly a programming error, not an IDL error.
> I would bet some money on that!
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155

Yes of course I used DEVICE, /CLOSE and DEVICE,/CLOSE_FILE!

Actually the more I look at this problem, the more I think it is an IDL bug, either
that or something
REALLY obscure. I have actually managed to get the labels printed each time under
some circumstances. What I have is something like:

old_dev=!D.NAME
:
:
program
:
:
IF old_dev NE !D.NAME THEN BEGIN
DEVICE,/CLOSE
SET_PLOT, old_dev
ENDIF

Normally !D.NAME would be 'X' when the procedure is first run, it would only be
changed during the course of the procedure when printing to a file, if the device
is changed it is closed and plotting is redirected to the old device before the
procedure quits, as above. I discovered (by chance) if I do a SET_PLOT, 'PS'
before running the procedure for the first time I can get labels printed on the
plots each time I run the procedure. But the PS device isn't being closed until I
rerun the procedure to generate the next plot. Oddly, if I now sent the output to
a window, the labels aren't printed in the window!?

So are there any "hidden variables" in IDL that control if labels are printed to
the X/PS devices?

Stu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Widget color tables
Next Topic: Maximum memory under Windows NT

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 17:15:30 PST 2025

Total time taken to generate the page: 0.00219 seconds