Re: Intermittent plotting problem [message #27066 is a reply to message #26926] |
Thu, 04 October 2001 18:03   |
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
|
|
|