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

Home » Public Forums » archive » plot colored ellipses
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
plot colored ellipses [message #79663] Sat, 24 March 2012 21:14 Go to next message
Thibault Garel is currently offline  Thibault Garel
Messages: 55
Registered: October 2009
Member
Hi,

I made a simple 2D scatter plot from a square array "matrix", using
plot, matrix,psym=3. I would like to make nice-looking images by:
- plotting ellipses instead of points (but centered on the points
coordinates)
- orientate these ellipses as I want
- use different colors for them
- apply a color gradient to each ellipse, i.e bright red in the center
and light at the edge
- etc

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... :)

thanks!
Re: plot colored ellipses [message #79791 is a reply to message #79663] Fri, 30 March 2012 06:33 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Friday, March 30, 2012 4:42:09 AM UTC-8, alx wrote:
> On 30 mar, 08:01, bing999 <thibaultga...@gmail.com> wrote:
>> Hi,
>>
>> thanks for your reply.
>>
>> i have been able to make simple ellipse plots with the tvellipse
>> routine, as Wayne suggested. However, it is hard to make nice images
>> with this tool... Before giving a real try at function graphics, do
>> you think that it will really allow to make good pictures with color
>> gradients ? I am asking that since I never used this tool so far and
>> it looks much more complex than standard plot routines... :)
>> Would you have examples of beautiful images computed with the function
>> graphics?
>> Cheers
>> Dreamer
>>
>>
>
> Here is Wayne's example written by using function graphics :
>
> pl = plot([0,100], [0,100], /NODATA)
> x = [10,40,80]
> y = [20,70,60]
> orient = [80,140,0]
> for i=0,2 do begin
> !null = ellipse(x[i], y[i], MAJOR=12, MINOR=6, THETA=orient[i], /
> DATA, FILL_COLOR=!COLOR.FIREBRICK)
> !null = ellipse(x[i], y[i], MAJOR=8, MINOR=4, THETA=orient[i], /
> DATA, FILL_COLOR=!COLOR.SALMON)
> endfor
>
> then, while adding another ellipse with "manual" color blending :
>
> pl.Refresh, /DISABLE
> !null = ellipse(60, 20, MAJOR=20, MINOR=10, /DATA, FILL_COLOR=!
> COLOR.FIREBRICK)
> for i=0,19 do !null = ellipse(60, 20, MAJOR=20*i*0.05,
> MINOR=10*i*0.05, LINESTYLE=6, $
> /DATA, FILL_COLOR=!COLOR.SALMON, FILL_TRANSPARENCY=6*i < 100)
> pl.Refresh
>
> alx.

I like that.
Re: plot colored ellipses [message #79792 is a reply to message #79663] Fri, 30 March 2012 05:42 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 30 mar, 08:01, bing999 <thibaultga...@gmail.com> wrote:
> Hi,
>
> thanks for your reply.
>
> i have been able to make simple ellipse plots with the tvellipse
> routine, as Wayne suggested. However, it is hard to make nice images
> with this tool... Before giving a real try at function graphics, do
> you think that it will really allow to make good pictures with color
> gradients ? I am asking that since I never used this tool so far and
> it looks much more complex than standard plot routines... :)
> Would you have examples of beautiful images computed with the function
> graphics?
> Cheers
> Dreamer
>
>

Here is Wayne's example written by using function graphics :

pl = plot([0,100], [0,100], /NODATA)
x = [10,40,80]
y = [20,70,60]
orient = [80,140,0]
for i=0,2 do begin
!null = ellipse(x[i], y[i], MAJOR=12, MINOR=6, THETA=orient[i], /
DATA, FILL_COLOR=!COLOR.FIREBRICK)
!null = ellipse(x[i], y[i], MAJOR=8, MINOR=4, THETA=orient[i], /
DATA, FILL_COLOR=!COLOR.SALMON)
endfor

then, while adding another ellipse with "manual" color blending :

pl.Refresh, /DISABLE
!null = ellipse(60, 20, MAJOR=20, MINOR=10, /DATA, FILL_COLOR=!
COLOR.FIREBRICK)
for i=0,19 do !null = ellipse(60, 20, MAJOR=20*i*0.05,
MINOR=10*i*0.05, LINESTYLE=6, $
/DATA, FILL_COLOR=!COLOR.SALMON, FILL_TRANSPARENCY=6*i < 100)
pl.Refresh

alx.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Retina!
Next Topic: comp.lang.idl-pvwave

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

Current Time: Wed Oct 08 13:44:27 PDT 2025

Total time taken to generate the page: 0.00688 seconds