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
Re: extra lines in colorbar [message #87433 is a reply to message #87432] Mon, 03 February 2014 04:27 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> 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?

Try saving the color table before you call cgColor, then restoring it after the call

tvlct, r, g, b, /get

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

tvlct, r, g, b

colors=bytscl(x)
plot, x,x,/nodata
for i = 0, 9 do plots, x[i],x[i], color=colors[i]
colorbar
[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: Sat Oct 11 02:41:42 PDT 2025

Total time taken to generate the page: 1.75874 seconds