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

Home » Public Forums » archive » strange output with xyouts
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: strange output with xyouts [message #85236 is a reply to message #85235] Thu, 18 July 2013 06:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
yfjulien.pub@gmail.com writes:

> This is my first time here, until now I managed to find answers to my problems through internet and forum searches but this time I couldn't find anything.
>
> I am experiencing a strange IDL behaviour with the xyouts function. I am using it to put a time stamp (such as '2013-01-01 09H59') on an satellite image, with the following code:
>
> device, retain=2, decomposed=0
> loadct, 0, /silent
> window, 2, xsize=1354, ysize=200
> wset, 2
> xyouts, 677, 50, '2013-01-01 09H59', $ alignment=.5,charsize=10,charthick=10,color=255, /device
> dateLegend = tvrd(true=3)
> wdelete, 2
>
> Now comes the problem: sometimes I get the dateLegend right, and sometimes not. More exactly, some times I get what I expect, the '2013-01-01 09H59' time stamp which is then inserted in my satellite image, but sometimes I only get a dot at the (677,50) position, and that's it. Since this code is inserted in a big loop over different images, and that this 'not working' behaviour only affects some of the images, with a frequence that seems random to me, I am quite
puzzled.
>
> I have tried the cgText function from the coyote library, I get the same dot result for the cases that are not working with xyouts. When I change the font (!p.font = 0; instead of !p.font=-1) I get the output text OK, but then I am unable to get it as big as I need.
>
> Has anyone experienced this kind of (I suppose) font problem with xyouts?

This doesn't sound to me like it has anything at all to do with XYOutS.
It is more likely that it is a problem with how the string is being
created and its interaction with the true-type font (which you don't
identify).

If I were a betting man, I would bet on there being a byte value
involved in the string creation part of the code (perhaps unexpectedly),
and that when this byte value gets converted to a string it results in
an unprintable ASCII character instead of a number.

I also doubt this happens "randomly". That's just too weird. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "Can't create pipe" on call to spawn.
Next Topic: Parallel and Perpendicular symbols in IDL 8 New Graphics.

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

Current Time: Sat Oct 11 15:12:25 PDT 2025

Total time taken to generate the page: 2.16391 seconds