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

Home » Public Forums » archive » normal, relative and ellipse
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
normal, relative and ellipse [message #90321] Thu, 19 February 2015 15:39 Go to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I just thought that I found a bug, but then I though about it again and well... I stopped after a while.
Can anybody explain me this:

i = image(/test, image_dimensions=[500,500], dimensions=[500,500])
e1 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='red',/norm,target=i, /relative)
e2 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='yellow',/norm,target=i, /relative)

now rescale the window and change the window aspect ratio (make it for example larger).

e2 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='yellow',/norm,target=i, /relative)

I would have expected e1 and e2 to be the same. According to the documentation for target:
"Set this keyword to indicate that the input arguments are specified in normalized [0,1] coordinates, relative to the axis range of the TARGET's dataspace."

What is the reason for this behavior? Bug or feature?

Thanks,
Helder
Re: normal, relative and ellipse [message #90324 is a reply to message #90321] Fri, 20 February 2015 07:27 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Thursday, February 19, 2015 at 4:39:23 PM UTC-7, Helder wrote:
> Hi,
> I just thought that I found a bug, but then I though about it again and well... I stopped after a while.
> Can anybody explain me this:
>
> i = image(/test, image_dimensions=[500,500], dimensions=[500,500])
> e1 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='red',/norm,target=i, /relative)
> e2 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='yellow',/norm,target=i, /relative)
>
> now rescale the window and change the window aspect ratio (make it for example larger).
>
> e2 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='yellow',/norm,target=i, /relative)
>
> I would have expected e1 and e2 to be the same. According to the documentation for target:
> "Set this keyword to indicate that the input arguments are specified in normalized [0,1] coordinates, relative to the axis range of the TARGET's dataspace."
>
> What is the reason for this behavior? Bug or feature?
>
> Thanks,
> Helder

I think /NORM and /RELATIVE are mutually exclusive. Try getting rid of the /NORM for your two ellipse calls.

-Chris
Re: normal, relative and ellipse [message #90350 is a reply to message #90324] Wed, 25 February 2015 01:39 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi Chris,
thanks, that worked. Now (I think) I understand what that sentence in the documentation meant.
Helder




On Friday, February 20, 2015 at 4:27:18 PM UTC+1, Chris Torrence wrote:
> On Thursday, February 19, 2015 at 4:39:23 PM UTC-7, Helder wrote:
>> Hi,
>> I just thought that I found a bug, but then I though about it again and well... I stopped after a while.
>> Can anybody explain me this:
>>
>> i = image(/test, image_dimensions=[500,500], dimensions=[500,500])
>> e1 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='red',/norm,target=i, /relative)
>> e2 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='yellow',/norm,target=i, /relative)
>>
>> now rescale the window and change the window aspect ratio (make it for example larger).
>>
>> e2 = ellipse(0.5,0.5,major=0.5,minor=0.5, fill_transparency=50,fill_color='yellow',/norm,target=i, /relative)
>>
>> I would have expected e1 and e2 to be the same. According to the documentation for target:
>> "Set this keyword to indicate that the input arguments are specified in normalized [0,1] coordinates, relative to the axis range of the TARGET's dataspace."
>>
>> What is the reason for this behavior? Bug or feature?
>>
>> Thanks,
>> Helder
>
> I think /NORM and /RELATIVE are mutually exclusive. Try getting rid of the /NORM for your two ellipse calls.
>
> -Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ENVITask
Next Topic: How to find second minimum and maximum in 3D array?

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

Current Time: Wed Oct 08 07:16:31 PDT 2025

Total time taken to generate the page: 0.00452 seconds