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

Home » Public Forums » archive » Object graphics axis
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Object graphics axis [message #17482] Fri, 22 October 1999 00:00 Go to next message
Karri Kaksonen is currently offline  Karri Kaksonen
Messages: 27
Registered: October 1999
Junior Member
I just came back from Davids course about object graphics and it
occured to me that a reason why positioning the axis objects is
so difficult is that the range depends on the location of the
axis.

The manual says that the range of the axis is set by a vector:

[-Xmin/(Xmax-Xmin), 1/(Xmax-Xmin)]

This may work if the length of the axis is 1.0 in normalized
coordinates. In the course I chose the length to be 2.0 and in
order to get it right I just tried out different values until
I found it to be closer to:

[-1-Xmin*2/(Xmax-Xmin), 2/(Xmax-Xmin)]

I thought about this on my flight home last night and what I am
afraid of is that the -1 in the first element may actually depend
on where the axis is drawn on the screen. My location of the axis
was at [-1.0, -1.0]. If this is the case then RSI should do
something about it before version 5.3 comes out. Otherwise you have
to update the range vector every time you reposition the axis.

If somebody understands what is going on, please drop a line.

--
Regards,

Karri Kaksonen
Re: Object graphics axis [message #17536 is a reply to message #17482] Sat, 30 October 1999 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
James Tappin <sjt@star.sr.bham.ac.uk> wrote in message
news:7vcaog$627$1@usenet.bham.ac.uk...
> Lets just be realistic: IDL object graphics is a pretty toy, which might
be
> useful for drawing scenes etc, but for real scientific data it's the
> proverbial heap of donkey dung. I would not like to try to write (for
> example) a routine to time label an arbitrary axis which might be anything
> from 2 minutes to 20 years in length with object graphics.

I have written (attempted to write?) reasonably versatile date & time axis
routines in both Direct Graphics and Object Graphics and found it somewhat
easier with Object Graphics. No, on second thoughts, much easier! With
object orientation you can create an object, query its properties, adjust
them etc and then wrap the result in a user-friendly, self-contained object.
Direct Graphics routines for the same purpose tend to be less robust and to
change the graphics system state in a way that can have unforeseen effects
later.

But I'll have a look at timebox...

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
Re: Object graphics axis [message #17546 is a reply to message #17482] Fri, 29 October 1999 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
> Lets just be realistic: IDL object graphics is a pretty toy, which might be
> useful for drawing scenes etc, but for real scientific data it's the
> proverbial heap of donkey dung.

I tend not to use strong language on the net and would just say that I
disagree. Drawing time axes is not the only scientific application I can think
of. I use IDL object graphics for what I consider scientific data and find it
very flexible, easy to use and fast (on Power PC). It is pretty indeed and for
the data I display the only viable alternative would be DF's "direct object
graphics".

> I would not like to try to write (for
> example) a routine to time label an arbitrary axis which might be anything
> from 2 minutes to 20 years in length with object graphics.

It may or may not be hard to do. It would probably be even harder to draw this
kind of thing accurately with a crayon - but it does not yet give a reason to
call crayons donkey dung.

To be short: if you dislike something it does not mean its useless or bad.

Cheers,
Pavel
Re: Object graphics axis [message #17547 is a reply to message #17482] Fri, 29 October 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
James Tappin (sjt@star.sr.bham.ac.uk) writes:

> Lets just be realistic: IDL object graphics is a pretty toy, which might be
> useful for drawing scenes etc, but for real scientific data it's the
> proverbial heap of donkey dung.

Oh, quite the contrary. For real scientific 3D data
it is fabulous. Although "donkey dung" would not
be the way I would characterize its 2D capability,
I will concede it is less useful for 2D graphics.
But, then, why would you be using it for 2D graphics
anyway? Almost everything you want to do can be
done (often better) in direct graphics.

> I would not like to try to write (for
> example) a routine to time label an arbitrary axis which might be anything
> from 2 minutes to 20 years in length with object graphics. [Anyone who wants
> to see how its done in direct graphics (well; up to 10 years the externsion
> to 25 hasn't been released yet) should go to:
> http://www.sr.bham.ac.uk/hi-scale_help/routine_search.html

It couldn't possibly be any more convoluted in object
graphics, but I still say stuff it. Put this here
TimeBox thing into an object of its own and THEN
you will have something worth using! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Object graphics axis [message #17548 is a reply to message #17482] Fri, 29 October 1999 00:00 Go to previous message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
David Fanning wrote:

> After spending literally hours trying to make *real*
> data show up in object graphics plots I threw up my
> hands and threw myself on the mercy of the IDL
> programmers who wrote the code. They supplied me
> with an algorithm, which with a few slight modifications
> to make it actually work, reliably creates the
> translation and scaling factors necessary to place
> a real data range into a particular view.

Lets just be realistic: IDL object graphics is a pretty toy, which might be
useful for drawing scenes etc, but for real scientific data it's the
proverbial heap of donkey dung. I would not like to try to write (for
example) a routine to time label an arbitrary axis which might be anything
from 2 minutes to 20 years in length with object graphics. [Anyone who wants
to see how its done in direct graphics (well; up to 10 years the externsion
to 25 hasn't been released yet) should go to:
http://www.sr.bham.ac.uk/hi-scale_help/routine_search.html

--
+------------------------+-------------------------------+-- -------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
Re: Object graphics axis [message #17549 is a reply to message #17482] Fri, 29 October 1999 00:00 Go to previous message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
James Tappin wrote:
> David Fanning wrote:
>> example) a routine to time label an arbitrary axis which might be anything
> from 2 minutes to 20 years in length with object graphics. [Anyone who wants
> to see how its done in direct graphics (well; up to 10 years the externsion
> to 25 hasn't been released yet) should go to:
> http://www.sr.bham.ac.uk/hi-scale_help/routine_search.html
>
Ooops:
Then look up timebox

--
+------------------------+-------------------------------+-- -------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to import an source interface ?
Next Topic: Re: undefined keyword variables

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

Current Time: Thu Oct 09 06:40:20 PDT 2025

Total time taken to generate the page: 1.67831 seconds