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

Home » Public Forums » archive » extra lines in colorbar
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
extra lines in colorbar [message #87432] Mon, 03 February 2014 01:57 Go to previous message
simona bellavista is currently offline  simona bellavista
Messages: 56
Registered: December 2009
Member
I am doing a plot with a colorbar and I get like 10 extra vertical lines in the bar.

The portion of code that uses colorbar is part of a long code, and this is the problem: the extra lines corresponds to colors that I have used elsewhere in the code calling the routine cgcolor('something').

Say that my startup file is something like

device,retain=2, decomposed=0
loadct, 39

and then I run the code

x = dindgen(10)
plot, x,x, color = cgcolor('red')
plot,x,x, color=cgcolor('green')

colors=bytscl(x)
plot, x,x,/nodata
for i = 0, 9 do plots, x[i],x[i], color=colors[i]
colorbar

red and green lines appear in the colorbar because I have called cgcolor('red') and cgcolor('green') previously.

Now, because I don't want to restart idl when I want to use this colorbar, is there a way to delete the memory of the fact that I have called cgcolor previously?

I have seen that there is already the topic of a FAQ in Coyote Library that looks similar

http://www.idlcoyote.com/color_tips/lineinct.html

but I don't understand if these two problems are exactly the same.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem in finding average for every 100 points in a data set.
Next Topic: logarithmic colorbar

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

Current Time: Fri Oct 10 09:13:07 PDT 2025

Total time taken to generate the page: 1.44479 seconds