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

Home » Public Forums » archive » Color Help (IDL)
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
Color Help (IDL) [message #6172] Thu, 02 May 1996 00:00
aothman is currently offline  aothman
Messages: 2
Registered: October 1995
Junior Member
I am looking for info on how to use color tables by using a varying array
for colors. I am using colored boxes inside a loop. I need the color to
change according to the array values. ( I am drawing a histogram) I do not
want to list the color number. That is the only way it has worked for me
so far. Please if anyone has an idea email me back at
aothman@magnus.acs.ohio-state.edu.
the following is the relevent code. Thanks Ahlem...
+++++++
;;;
; testing color this time
;;;
rcolor = intarr(7)
gcolor = intarr(7)
bcolor = intarr(7)
rcolor(0) = 0
gcolor(0) = 0
bcolor(0) = 0
rcolor(1) = 255
gcolor(1) = 0
bcolor(1) = 0
rcolor(2) = 0
gcolor(2) = 255
bcolor(2) = 0
rcolor(3) = 0
gcolor(3) = 0
bcolor(3) = 255
rcolor(4) = 180
gcolor(4) = 64
bcolor(4) = 0
rcolor(5) = 64
gcolor(5) = 100
bcolor(5) = 200
rcolor(6) = 200
gcolor(6) = 0
bcolor(6) = 200
tvlct, rcolor, gcolor, bcolor ;;;;;;;;;
xyouts,360,yannot,legnd(dhrs), size = .5,color=1; I want to use an array here
; instead of color=1
;;;;;;;;;
for dsctr=0,n_elements(xval)-2 do $
box, xval(dsctr)+xoff,minval, $
xval(dsctr)+xoff+del, $
allpts(dsctr,dhrs), $
3
;colors(dhrs)
--
o------------------------Civil & Environmental Eng. & Eng. Graphics----------o
Ahlem Ben-Othman | Phone: (614) 292-2493
Engineering Graphics | FAX: (614) 292-
The Ohio State University | Email: aothman@magnus.acs.ohio-state.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: CyberChat // CyberChat // CyberChat // CyberChat // CyberChat
Next Topic: QuickTime to IDL

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

Current Time: Wed Oct 08 16:01:01 PDT 2025

Total time taken to generate the page: 0.00369 seconds