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

Home » Public Forums » archive » Intermittent plotting problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Intermittent plotting problem [message #26926] Thu, 04 October 2001 12:52 Go to next message
hawkins is currently offline  hawkins
Messages: 2
Registered: October 2001
Junior Member
Hello,

I have a plotting program running on a windows computer,
and the problem is sometimes it works and sometimes it
doesn't (the exact same program with nothing changed).
When it doesn't work, most of the plot is made fine,
except that none of the lines from the "Plots" commands
are drawn. The gist of the program is ...

window,1,xsize=782*3,ysize=1020*3,/pixmap
plot,x,y,psym=3
...
plots,[.04,.23],[.925,.925],color=255,/normal,thick=3.0,line style=0
plots,[.23,.23],[.925,.96],color=!d.n_colors-1,/normal,thick =3.0,linestyle=0
...
write_png,filename,not(tvrd())
wdelete,1

Rebooting sometimes solves the problem but not always.
Does anyone have the answer to this intermittent problem?




George Hawkins
American Association of Variable Star Observers
25 Birch St.
Cambridge, MA 02138
hawkins@aavso.org
Re: Intermittent plotting problem [message #27047 is a reply to message #26926] Fri, 05 October 2001 14:44 Go to previous message
hawkins is currently offline  hawkins
Messages: 2
Registered: October 2001
Junior Member
Paul and David,

thanks for your help. I tried device, decomposed=0 and
color=!d.table_size-1 but the program still didn't work.
I traced the problem to the particular computer involved.
I tried the program on 3 other machines and it worked
consistently on each one. I don't know whether it was
a hardware or (software?) memory problem, but it
definitely didn't want to work on that one computer
(unfortunately the first one I tried). Thanks again for
your help.

George Hawkins
Re: Intermittent plotting problem [message #27066 is a reply to message #26926] Thu, 04 October 2001 18:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George Hawkins (hawkins@aavso.org) writes:

> I have a plotting program running on a windows computer,
> and the problem is sometimes it works and sometimes it
> doesn't (the exact same program with nothing changed).
> When it doesn't work, most of the plot is made fine,
> except that none of the lines from the "Plots" commands
> are drawn. The gist of the program is ...
>
> window,1,xsize=782*3,ysize=1020*3,/pixmap
> plot,x,y,psym=3
> ...
> plots,[.04,.23],[.925,.925],color=255,/normal,thick=3.0,line style=0
> plots,[.23,.23],[.925,.96],color=!d.n_colors-1,/normal,thick =3.0,linestyle=0
> ...
> write_png,filename,not(tvrd())
> wdelete,1
>
> Rebooting sometimes solves the problem but not always.
> Does anyone have the answer to this intermittent problem?

Color decomposition. :-)

I'm going to predict that when the program works
color decomposition is turned OFF (Device, Decomposed=0),
and when it doesn't work color decomposition is turned
ON (Device, Decomposed=1). I'm going to further
assert (I'm feeling really bold today) that you
don't have any idea what the color decomposition
state is when you execute these commands. :-)

I'll even offer a postulate. The program will
work more often than it does now if you change
!D.N_Colors to !D.Table_Size.

Rebooting will indeed sometimes solve the problem
(although it seems a bit over the top to me), but
knowing where you are when you draw graphics
always works more reliably for me.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Intermittent plotting problem [message #27073 is a reply to message #26926] Thu, 04 October 2001 13:26 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
George Hawkins wrote:
>
> Hello,
>
> I have a plotting program running on a windows computer,
> and the problem is sometimes it works and sometimes it
> doesn't (the exact same program with nothing changed).
> When it doesn't work, most of the plot is made fine,
> except that none of the lines from the "Plots" commands
> are drawn. The gist of the program is ...
>
> window,1,xsize=782*3,ysize=1020*3,/pixmap
> plot,x,y,psym=3
> ...
> plots,[.04,.23],[.925,.925],color=255,/normal,thick=3.0,line style=0
> plots,[.23,.23],[.925,.96],color=!d.n_colors-1,/normal,thick =3.0,linestyle=0
> ...
> write_png,filename,not(tvrd())
> wdelete,1
>
> Rebooting sometimes solves the problem but not always.
> Does anyone have the answer to this intermittent problem?

Are you sure the "plots" lies are drawn, but are the same color as the background? I.e. a color
problem. The reason I ask is a similar thing happended to me today when I used COLOR=255. I
don't know enough about the WRITE_PNG routine to know if this is the issue or not (at least for
the first PLOTS although the second might screw up also if the color table is weird).

$0.02

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Using MIN on arrays : Exorcising loops?
Next Topic: IDL LINUX support question

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

Current Time: Wed Oct 08 17:28:23 PDT 2025

Total time taken to generate the page: 0.00728 seconds