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

Home » Public Forums » archive » Plotting using Symbols (Object Graphics only)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Plotting using Symbols (Object Graphics only) [message #15356] Tue, 11 May 1999 00:00
gadagkar is currently offline  gadagkar
Messages: 3
Registered: November 1998
Junior Member
I wrote an application that contains a scene object consisting of 2
views. Each view displays a 2D plot drawn with lines/symbols. The
application was written by combining the sel_obj.pro example from IDL
and xsurface.pro from David Fanning. For some reason the symbols get
distorted if not scaled properly. What is the best way to rescale the
symbols so that they would look the same all the time? The scaling that
I have used works better for one plot only. Both plots have the same
number of data points but min/max range is slightly different.

***** START *****

; create symbol object
psym = Obj_New('IDLgrSymbol', 4)

; metal_buf contains 60 data points to be plotted
metalPlot = Obj_New('IDLgrPLOT', dist, metal_buf, _Extra=extra, $
Color=[0,0,0], Symbol=psym, LineStyle=6)

; Get the data ranges from the Plot Object.

metalPlot->GetProperty, XRange=xrange, YRange=yrange

; Set up the scaling so that the axes for the plot and the
; plot data extends from 0->1 in the X and Y directions.

xs = Normalize(xrange)
ys = Normalize(yrange)

; apply scaling to the symbols so that they don't get distorted
psym->SetProperty, SIZE=[1/(59*xs[1]), 1/(25*ys[1])]

; Scale the plot data into 0->1.

metalPlot->SetProperty, XCoord_Conv=xs, YCoord_Conv=ys

***** End *****


--
Hrishikesh P. Gadagkar, Ph.D
Norland Medical Systems
W6340 Hackbarth Road
Fort Atkinson WI 53538


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
[Message index]
 
Read Message
Previous Topic: Re: Format strings with comma separated lists
Next Topic: Re: Help: antenna pattern plotting (polar plots)

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

Current Time: Thu Oct 09 21:35:22 PDT 2025

Total time taken to generate the page: 1.43976 seconds