|
Re: 3D UserSym? [message #67524 is a reply to message #67523] |
Mon, 03 August 2009 14:00   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Aug 3, 11:24 am, Brian Daniel <Daniels...@yahoo.com> wrote:
> I created at 3D scatter plot and animated a rotation using
> XInterAnimate. When I view the scatter plot in the Z vs XY plane
> (through manipulating the Az and Ax keywords) my plot points disappear
> because they are drawn in just 2 dimensions. Is there a way (maybe
> with UserSym) to create 3D plot points? Thanks!
An example of how to do it with iplot:
x=randomu(seed,100)
y=randomu(seed,100)
z=randomu(seed,100)
osph=obj_new('orb') ;sphere object to use as symbol
iplot,x,y,z,sym_object=osph,/scatter
One potential advantage is that the properties can be changed after
the plot is made, and the plot reflects the changes. For instance, to
change the color and radius:
osph->setproperty,color=[255,255,0],radius=2.0
Note that since the object is created by you, it will keep existing
even after the iplot window is closed.
|
|
|
Re: 3D UserSym? [message #67525 is a reply to message #67524] |
Mon, 03 August 2009 10:18   |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <MPG.24e0a5a44f0ff7a998a749@news.giganews.com>,
David Fanning <news@dfanning.com> wrote:
> Brian Daniel writes:
>
>> I created at 3D scatter plot and animated a rotation using
>> XInterAnimate. When I view the scatter plot in the Z vs XY plane
>> (through manipulating the Az and Ax keywords) my plot points disappear
>> because they are drawn in just 2 dimensions. Is there a way (maybe
>> with UserSym) to create 3D plot points?
>
> No, it is not possible with USERSYM. If you are doing
> 3D things, you really want to do them in a 3D graphics
> system. That is, use object graphics, not direct graphics.
>
> Cheers,
>
> David
Even the iTools, which are supposed to be 3-D graphics utilities,
only support 2-D plotting symbols by default. You can provide a
custom symbol with the SYM_OBJECT keyword, but it is a struggle for me
to figure out how to do that. A beginner would be clueless.
I submitted a formal request to ITT to add the Platonic solids plus sphere
as default plot symbols that could be referenced by index (without
having to make your own object), but that obviously didn't make the cut.
Ken Bowman
|
|
|
Re: 3D UserSym? [message #67526 is a reply to message #67525] |
Mon, 03 August 2009 09:21   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mgalloy writes:
> SYMBOL should still be there:
>
> ~$ idl
> IDL Version 7.1, Mac OS X (darwin x86_64 m64). (c) 2009, ITT Visual
> Information Solutions
>
> IDL> sym = obj_new('IDLgrSymbol', 4, size=0.1)
> IDL> polyline = obj_new('IDLgrPolyline', findgen(10), findgen(10),
> symbol=sym)
> IDL> xobjview, polyline
Humm. Well, I see it here on this machine. But I certainly
didn't see it this morning. In my old example (which I don't
have here, now!) I using passing the orb into the POLYLINE
directly with SYMBOL. Perhaps I was misinterpreting the
error message, as I see the orb now has to be a subclassed
symbol object. Maybe mine wasn't.
Anyway, I'll have to figure it out tonight. If I'm
successful, I have an example of a 3D scatterplot that
uses this functionality. :-)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: 3D UserSym? [message #67529 is a reply to message #67528] |
Mon, 03 August 2009 07:59   |
Brian Daniel
Messages: 80 Registered: July 2009
|
Member |
|
|
Thanks for you honesty. I'm extremely new to object graphics. Its a
good reason to learn.
On Aug 3, 10:44 am, David Fanning <n...@dfanning.com> wrote:
> Brian Daniel writes:
>> I created at 3D scatter plot and animated a rotation using
>> XInterAnimate. When I view the scatter plot in the Z vs XY plane
>> (through manipulating the Az and Ax keywords) my plot points disappear
>> because they are drawn in just 2 dimensions. Is there a way (maybe
>> with UserSym) to create 3D plot points?
>
> No, it is not possible with USERSYM. If you are doing
> 3D things, you really want to do them in a 3D graphics
> system. That is, use object graphics, not direct graphics.
>
> I used to have an example of a 3D scatter plot that used
> round pin-shaped symbols to locate the points. But I see
> this example program no longer works, because they have
> removed the SYMBOL keyword from the IDLgrPolyline object.
>
> I really have no idea exactly how to do this at the moment,
> and I have no more time to play with it today. Perhaps someone
> else has a clue. But, in any case, I think object graphics
> is your only real solution, assuming we can figure out
> how it is done. :-)
>
> 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.")
|
|
|
Re: 3D UserSym? [message #67530 is a reply to message #67529] |
Mon, 03 August 2009 07:59   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
David Fanning wrote:
> I used to have an example of a 3D scatter plot that used
> round pin-shaped symbols to locate the points. But I see
> this example program no longer works, because they have
> removed the SYMBOL keyword from the IDLgrPolyline object.
SYMBOL should still be there:
~$ idl
IDL Version 7.1, Mac OS X (darwin x86_64 m64). (c) 2009, ITT Visual
Information Solutions
IDL> sym = obj_new('IDLgrSymbol', 4, size=0.1)
IDL> polyline = obj_new('IDLgrPolyline', findgen(10), findgen(10),
symbol=sym)
IDL> xobjview, polyline
Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
|
|
|
Re: 3D UserSym? [message #67531 is a reply to message #67530] |
Mon, 03 August 2009 07:44   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian Daniel writes:
> I created at 3D scatter plot and animated a rotation using
> XInterAnimate. When I view the scatter plot in the Z vs XY plane
> (through manipulating the Az and Ax keywords) my plot points disappear
> because they are drawn in just 2 dimensions. Is there a way (maybe
> with UserSym) to create 3D plot points?
No, it is not possible with USERSYM. If you are doing
3D things, you really want to do them in a 3D graphics
system. That is, use object graphics, not direct graphics.
I used to have an example of a 3D scatter plot that used
round pin-shaped symbols to locate the points. But I see
this example program no longer works, because they have
removed the SYMBOL keyword from the IDLgrPolyline object.
I really have no idea exactly how to do this at the moment,
and I have no more time to play with it today. Perhaps someone
else has a clue. But, in any case, I think object graphics
is your only real solution, assuming we can figure out
how it is done. :-)
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.")
|
|
|
Re: 3D UserSym? [message #67620 is a reply to message #67523] |
Tue, 04 August 2009 07:26  |
Brian Daniel
Messages: 80 Registered: July 2009
|
Member |
|
|
Wow! Great program. I'm still new to object IDL, but I think I have
plenty to see me through. I'm fascinated that objects make so many
things more functional. Thanks so much!
-Brian
PS - I've used the iTools package in the past, but the size of my data
sets make the interaction really clunky. And again, being new to
object-oriented stuff turned me off as well. If I start to drown in
objects again, I may use iTools as a floatation device. Thanks for
the tip, PP.
> http://www.dfanning.com/tip_examples/scatter_surface.pro
>
|
|
|