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

Home » Public Forums » archive » color and tvellipse
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
color and tvellipse [message #75631] Tue, 15 March 2011 14:01
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
Hi all,

I want to draw a number of ellipses with TVEllipse, and have the color
of each ellipse correspond to one of the colors in a discrete
colorbar. I'm using CG, so I created the plot with cgPlot, /nodata...
then I loaded the color table with cgLoadCT, and created the colorbar
with cgDCBar. However, when I try to use the color indices with
TVEllipse, they all are plotted in black. Any suggestions?

Here's my code:

cgplot, indgen(3), /nodata, xra=[x0,x1], yra=[y0,y1],$
xst=1, yst=1, charsize=1.25, xtitle='Right Ascension (hours)', $
ytitle='Declination (hours)', title='Survey Extent', $
position=[0.1,0.1,0.85,0.9]
for i=0,nd-1 do $
cgplots, ra[*,i], dec[*,i]
for i=0,nr-1 do $
cgplots, ra[i,*], dec[i,*]
cgloadct, 25, /brewer, ncolors=12, bottom=1
cgdcbar, ncolors=12, bottom=1, color='navy', $
labels=themonths(/abbrev),/vertical
for i=0,nday-1,10 do tvellipse,3,45,ra0[i],dec0[i],0,months[i],/data
[Message index]
 
Read Message
Previous Topic: Re: X/Y convert to lat/lon
Next Topic: Re: Problem with Vcolorbar under IDL 8.0 ?

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

Current Time: Wed Oct 08 15:52:30 PDT 2025

Total time taken to generate the page: 0.00464 seconds