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

Home » Public Forums » archive » Using VERT_COLORS=RGBA in PLOT()?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Using VERT_COLORS=RGBA in PLOT()? [message #88569] Tue, 13 May 2014 09:27 Go to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
Dear Folks,

I am trying to create a scatter plot in IDL 8.3 (MacOS)
whose symbols have different colors and alpha values.
The documentation for plot() suggests that I should be able to pass a 4 x NPTS array of
RGBA values to the VERT_COLORS property of plot(), where NPTS is the number of points in
my data set. When I try this, IDL complains:

% PLOT: Array subscript for PALETTE must have same size as source expression.

Here's a minimal example:

npts = 10
a = findgen(2,npts)
rgb = bytarr(3,npts)
p1 = plot(a, vert_colors=rgb) ; works
p2 = plot(a, vert_colors=rgba) ; doesn't work

I'd be grateful for pointers on how to set the transparency of individual vertices
in a plot.

Many thanks,

David
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: confused about usage of IDLanROI in Itools
Next Topic: Help me understand this interpol bug in GDL

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

Current Time: Wed Oct 08 13:56:42 PDT 2025

Total time taken to generate the page: 0.00222 seconds