IDlgrSymbol recompute_dimensions ?? [message #59571] |
Thu, 03 April 2008 10:46  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Hi folks,
I've a problem when I use symbols in IDLgrPlot. After plot my values I
do a conversion using NORMALIZE function from COYOTE'S guide
(www.dfanning.com).
The symbol of each plot value is deformed when I set XCOORD_CONV and
YCOORD_CONV properties.
IDLgrSymbol dont have the recompute dimensions property, then how can
I do for draw a plot and normalize it with no deformation on my
symbols ?
Thanks
Bernat
|
|
|
|
Re: IDlgrSymbol recompute_dimensions ?? [message #59668 is a reply to message #59571] |
Thu, 03 April 2008 11:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
bernat writes:
> I do that,
>
> plot=OBJ_NEW('IDlgrPlot', SYMBOL=oSymbol)
>
> plot->SetProperty, DATAX=datax, DATAY=datay
> plot->GetProperty, XRANGE=xrange, YRANGe=yrange
>
> xs=NORMALIZE(xrange, POSITION=[location[0],
> location[0]+dimensions[0]])
> ys=NORMALIZE(yrange, POSITION=[location[1],
> location[1]+dimensions[1]])
>
> plot->SetProperty, XCOOR_CONV=xs, YCOORD_CONV=ys
>
> Where datax and datay are my values, oSymbol is my IDLgrSymbol and
> location and dimensions is the position and dimensions of the plot in
> the View.
Oh, right. I don't have time to work on this, but
I see in XPLOT (on my web page), I have had to size
the symbol according to the axes ranges. I've done
something like this:
; Size the symbols appropriately for the plot.
xSymSize = (xrange[1] - xrange[0]) * 0.015 * symSize
ySymSize = (yrange[1] - yrange[0]) * 0.015 * symSize
IF Obj_Valid(thisSymbol) THEN $
thisSymbol->SetProperty, Size=[xSymSize, ySymSize]
If I don't do that, the symbols are completely misshaped.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: IDlgrSymbol recompute_dimensions ?? [message #59669 is a reply to message #59571] |
Thu, 03 April 2008 11:24  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
I do that,
plot=OBJ_NEW('IDlgrPlot', SYMBOL=oSymbol)
plot->SetProperty, DATAX=datax, DATAY=datay
plot->GetProperty, XRANGE=xrange, YRANGe=yrange
xs=NORMALIZE(xrange, POSITION=[location[0],
location[0]+dimensions[0]])
ys=NORMALIZE(yrange, POSITION=[location[1],
location[1]+dimensions[1]])
plot->SetProperty, XCOOR_CONV=xs, YCOORD_CONV=ys
Where datax and datay are my values, oSymbol is my IDLgrSymbol and
location and dimensions is the position and dimensions of the plot in
the View.
|
|
|
Re: IDlgrSymbol recompute_dimensions ?? [message #59670 is a reply to message #59571] |
Thu, 03 April 2008 10:58  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
bernat writes:
> I've a problem when I use symbols in IDLgrPlot. After plot my values I
> do a conversion using NORMALIZE function from COYOTE'S guide
> (www.dfanning.com).
Why are you doing a conversion *after* the plot?
> The symbol of each plot value is deformed when I set XCOORD_CONV and
> YCOORD_CONV properties.
When you set them on what?
> IDLgrSymbol dont have the recompute dimensions property, then how can
> I do for draw a plot and normalize it with no deformation on my
> symbols ?
Why do you want to normalize them? I should think simply scaling them
would be enough.
Need more info...
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|