Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Re: simple, yet eluding...different color lines in a plot
T Bowers (tbowers@nrlssc.navy.mil) writes: > how do i oplot so that different data get assigned different colors, eg. > > plot,x,a > ;a should be red curve > oplot,x,b > ;b should be green curve > oplot,x,c > ;c should be blue curve TVLCT, [255, 0, 0], [0, 255, 0], [0, 0, 255], 1 Plot, x, a, Color=1 Plot, x, b, Color=2 Plot, x, c, Color=3 Cheers, David P.S. If you look on my web page you will find the program GetColor, so that you could do this (I'm assuming 8-bit display in this example, although GetColor also works in 16-bit and 24-bit mode): TVLCT, GetColor('red'), 10 Plot, redvec, Color=10 ---------------------------------------------------------- David Fanning, Ph.D. Fanning Software Consulting E-Mail: davidf@dfanning.com Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155 Coyote's Guide to IDL Programming: http://www.dfanning.com/