Re: Plot 3-D markers in iPlot [message #51263] |
Fri, 10 November 2006 11:10 |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <MPG.1fbe5b8c54f63e1d989db1@news.frii.com>,
David Fanning <news@dfanning.com> wrote:
> I'm not sure you will be any more enlightened when Ronn's
> book arrives, at least with respect to how to do this with
> an iTool. It's fairly straightforward to do it with object
> graphics, however. In fact, we were having this discussion
> just a day or so ago in a thread entitled "3D plotting".
> The example I showed used a Rick Towler object named
> RHTgrPSolid to produce a 3D tetrahedron that I used
> as symbols in that scatterplot.
Yes, I had already found that, but was not clear on how to get
a symbol object into an iTool. A lot of trial and error led to
this, which will work for me:
x = [0.0, 10.0] ;Make some test data
y = x
z = x
iPlot, x, y, z, /NO_SAVEPROMPT ;iPlot the data
itool_id = itGetCurrent(TOOL = itool_obj) ;Get the iTool object identifier
orb_obj = OBJ_NEW('orb', COLOR=[240,0,0], STYLE=1, DENSITY=3.0) ;Make an orb object
orb_obj -> Scale, 1.0, 1.0, 1.0/0.7 ;Undo default 3-D scaling (z = 70%)
symbol_obj = OBJ_NEW('IDLgrSymbol', orb_obj, Size=[0.25, 0.25, 0.25]) ;Make a symbol object
polyline_obj = OBJ_NEW('IDLgrPolyline', [4.0, 5.0], [4.0, 5.0], [4.0, 5.0], $ ;Create a polyline object with symbols
LINESTYLE = 6, SYMBOL = symbol_obj)
data_space_id = itool_obj -> FindIdentifiers('*DATA SPACE', /VISUALIZATIONS) ;Find the data space id
data_space_obj = itool_obj -> GetByIdentifier(data_space_id) ;Find the data space object reference
data_space_obj -> Add, polyline_obj ;Add the polyline to the data space
So, I can create an orb object and use that to make a symbol object.
A symbol object cannot be plotted directly (as best I can see), but
it can be used as the marker for a polyline. The polyline can be added into
the iTool's data space.
Since a polyline has to have at least two points, it is not possible
to plot a single symbol. Of course, the end points can be the same point.
This seems slightly silly to me, but there you go.
Ken
|
|
|
Re: Plot 3-D markers in iPlot [message #51268 is a reply to message #51263] |
Fri, 10 November 2006 08:49  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kenneth Bowman writes:
> While I wait for Ronn Kling's book to arrive, perhaps someone can help me.
>
> iPlot's selection of marker types are all 2-dimensional. They look pretty
> ugly in 3-D and disappear when viewed edge on(!). (I'll submit a feature
> request to ITTVIS to see if they can add 3-D markers.)
>
> In the meantime, I would like to try to "manually" plot 3-D markers at selected
> points. I have found several primitive solid objects through this group, but I
> don't know much about object graphics, so it is not clear how to display them in
> an existing iTool.
>
> Small spheres would be nice, and I don't need to display a lot of them,
> so performance should not be an issue.
I'm not sure you will be any more enlightened when Ronn's
book arrives, at least with respect to how to do this with
an iTool. It's fairly straightforward to do it with object
graphics, however. In fact, we were having this discussion
just a day or so ago in a thread entitled "3D plotting".
The example I showed used a Rick Towler object named
RHTgrPSolid to produce a 3D tetrahedron that I used
as symbols in that scatterplot.
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.")
|
|
|