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

Home » Public Forums » archive » Re: plot colored ellipses
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: plot colored ellipses [message #79656] Sun, 25 March 2012 15:56 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Sunday, March 25, 2012 12:14:56 AM UTC-4, bing999 wrote:

> Could you please tell me where I should start to make such image?
> because I am not very used to make pretty images in IDL... :)

I might try drawing the ellipse with tvellipse.pro
( http://idlastro.gsfc.nasa.gov/ftp/pro/tv/tvellipse.pro )
with the /fill keyword. TVELLIPSE lets one specify the orientation and color of each ellipse. While one can't fill the ellipses with color gradient, it might be sufficient for you to draw concentric ellipses with inner one having the brighter color. Here is a test example:

pro test
plot,indgen(100),/nodata
x = [10,40,80]
y = [20,70,60]
orient = [80,140,0]
for i =0,2 do begin
;outer ellipse in dark red
tvellipse,12,6,x[i],y[i],orient[i],color='red7',/fill
;inner ellipse in bright red
tvellipse,8,4,x[i],y[i],orient[i],color='red4' ,/fill
endfor
return
end

--Wayne

P.S. I recently had to draw about 20 overlapping filled polygons, and ensure that each polygon could be seen. The direct graphics POLYFILL procedure does not have a transparency capability (though for the case of two polygons one can fake this using the Z buffer (e.g.
http://www.idlcoyote.com/fileio_tips/transparent.html ). In function graphics, the POLYGON() function handles transparency beautifully (if slowly), but I became frustrated by the quirks of function graphics, especially when plotting into a WIDGET_WINDOW. I finally realized by plotting the polygons in direct graphics from largest to smallest, I could (mostly) ensure that all the polygons would be visible. It is not as nice true transparency but was sufficient for my needs.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL_Savefile use
Next Topic: CG Elevation image + arbitrary discrete colorbar

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

Current Time: Fri Oct 10 04:47:39 PDT 2025

Total time taken to generate the page: 0.96025 seconds