Re: NORMALIZE.pro strange behavior ? [message #69373] |
Fri, 15 January 2010 07:45  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Sometimes IDL sucks, grahhrha%###@$grhahr$2HAHg@aaf## !
Thank you David for your help and for your contribution on the IDL
community.
nata
|
|
|
Re: NORMALIZE.pro strange behavior ? [message #69378 is a reply to message #69373] |
Thu, 14 January 2010 18:54   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
nata writes:
> I want to plot, using object graphics, the following data:
> xr=[0,10]
> yr=[5,-5]
> datax=findgen(10)
> datay=reverse(findgen(10)-5)
>
> Using direct graphics I don't have any problem: PLOT, datax, datay,
> xr=xr, yr=yr
> Normally, when I use object graphics I use the normalize.pro function
> from coyote's library. So, the same code to plot the data using object
> graphics should be this:
>
> aa=OBJ_NEW('IDLgrPlot')
> aa->Setproperty, datax=datax, datay=datay, xr=xr, yr=yr, THICK=20
> position=[10,90]
> xs=NORMALIZE(xr, POSITION=position)
> ys=NORMALIZE(yr, POSITION=position)
> aa->SetProperty, xcoord_conv=xs, ycoord_conv=ys
> XOBJVIEW, aa
>
> Oups ! what's happening here. There is no result... ?? I think that
> the problem is because my yrange is from a positive value to a
> negative value.
> Do you know what's happening here and how can I obtain the same result
> as direct graphics ?
This has absolutely nothing to do with Normalize (or FSC_Normalize,
as it is known these days). It has to do with the fact that whoever
designed the object graphics system had no idea someone would want
to display reversed axes like this. :-(
http://www.dfanning.com/ographics_tips/axis_reverse.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|