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

Home » Public Forums » archive » Re: controlling plot appearance (was "line graph problems")
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
Re: controlling plot appearance (was "line graph problems") [message #24333] Tue, 27 March 2001 10:33
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Craig Markwardt wrote:
>
> Martin Schultz <martin.schultz@dkrz.de> writes:
>> You speak "out of my heart" here. And this is exactly the reason why
>> David went ahead recently to develop a graphical tool to set up plot
>> properties. Since it concentrates on getting the correct values for
>> the myriad of plot keywords, it is not necessarily more "intuitive"
>> than these, but at least you get "instant gratification" in that you
>> can see what effect a keyword setting has. But if you are a little
>> more "anal" in the ay things should look (this is a quote from several
>> posts of David), there is really no way around messing with character
>> sizes and positions - and here, IDL (at least in direct graphics) does
>> a rather lousy job in providing the user with reasonable defaults or
>> an easy reference frame. What is clearly missing, I think, is a
>> "panel" coordinate system which would have "normal" coordinates with
>> respect to a plot, not to the entire window or page.
> ... other requests removed
>
> I hear you Martin, and I agree with you. We need more control over
> our plots sometimes.
>
> It dawned on me that we may not need *more* keywords to PLOT. Rather,
> there should be a simple way to piece together a plot from simple
> primitives.

For me, that's exactly what I *don't* want to do.

> AXIS is a good start be we need other primitives to
> establish coordinate systems and perform data scaling.

Argh. Who wants to establish coordinate systems explicitly everytime they make a plot? It
would be like using, oh, OG. :o)

Data scaling I already do using the '*' operator, as in "scale_factor * x_data" :o)

> Instead of
> shoehorning more stuff into a monolithic plot command,

Emotive words. I prefer the "addition" of more "features" to produce a more "flexible"
plot command.


> In any case, I don't think it matters. RSI probably considers direct
> graphics to be the wave of the past.

Nuts - I was afraid someone was going to bring that up. Still, if RSI does plan this and
if they do do it, I sure hope they make it transparent to the DG users, i.e. all the old
code still works the same way. I guess I'd better start learning some other handy-dandy
language anyway just in case. sigh.

Come to think of it, I wonder what RSI sees as its "user base" of the future? Programmers
who put together large project whiz-bang widgets thingoes or non-programmers who just want
to look at line plots/surface/images *quickly* to gain some insight into their data? One
of the best things about IDL, I reckon, is when someone gives me a data file, I read it in
in about 30 seconds, then display a plot, surface, or image in about 2 seconds. The
eye-widening, jaw-dropping, "howdyadothat?" look is becoming rarer what with scientist
folk becoming more familiar with IDL-like tools, but it still happens every now and again.
:o)

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
paul.vandelst@noaa.gov Alexander Pope.
Re: controlling plot appearance (was "line graph problems") [message #24336 is a reply to message #24333] Tue, 27 March 2001 09:33 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
D

I knew we could smoke you out!

B

David Fanning wrote:
>
> Ben Tupper (btupper@bigelow.org) writes:
>
>> It would be relatively easy to create an plotting object for direct
>> graphics (I'm not volunteering for this until I get more than just red
>> colors on my display!) New graphics keywords could be added, like your
>> YTITLE_SHIFT keyword example. Once you figure out what to do with the
>> YTITLE given its SHIFT, you make it a method within the object to handle
>> that property. You could introduce other keywords like XSUBTITLE and
>> YSUBTITLE. Similar objects could be created for any kind of direct
>> graphics routine (I have started a direct graphics contour object a
>> number of times... someday I shall finish it... what? it's 2001
>> already?)
>>
>> Here's what it might look like:
>>
>> MyPlotObj = obj_new('DG_Plot', X, Y, YTITLESHIFT = [-0.1, 0],
>> OTHERKEYWORDS = ....)
>> MyPlotObj->Plot
>> ;ah shoot, forgot to set these
>> MyPlotObj->SetProperty, Background = 3, isotropic = 1
>> MyPlot->Plot
>> ;make a printout
>> devicename = !D.name
>> Set_plot, 'printer'
>> MyPlotObj->Plot
>> Device, /Close
>> Set_plot, devicename
>>
>> Obj_destroy, MyPlotObj
>>
>>
>> If it were that simple then would you still say, 'if I can't create a
>> plot in one or two lines of code then forget it'? I think that is a
>> really important question, (at least I find myself asking this over and
>> over before starting a new project.)
>
> Oh, I think it could be made a LOT easier than that!
>
> As Martin and I have alluded to, we have been trying
> to develop a program that gives the user a bit more
> control over how a plot looks on the display. I guess
> it might be time to reveal it and get user feedback.
> This is truly version 1.0 of the software. Even we
> have some ideas for things it still needs. :-)
>
> And it is not nearly as sophisticated as rotating
> axis labels or shifting labels by some small amount.
> But I can envision it becoming something like that.
> That is to say, I know how to do those kinds of things,
> and I believe I could implement it in the object
> oriented approach we have used here. But, alas, we
> are offering the software for free, so you pretty
> much have to take what you get and rely on the kindness
> of strangers for updates. :-)
>
> I'll put the program up on my web page for a limited
> time, if people want to try it out. The Max-Plank
> Institute of Meteorology has provided a small amount
> of funding to bring this software to you. I hope you
> extend your gratitude to those folks should you ever
> run into them.
>
> The program is here:
>
> http://www.dfanning.com/programs/mpi_plot.zip
>
> The program uses a number of files from both the Coyote
> Library and Martin's Max-Plank library. I've included
> everything you need in the zip file. To try it out, I
> recommend you unzip the files in a local directory,
> then either CD into that directory from within IDL
> (highly recommended) or add the directory to your path
> (this could be a problem if you don't have the latest
> Coyote or Max Plank files in directories ahead of this
> one on the path). To run the program, just type MPI_PLOT.
> Or, you can use your own data. This is basically a wrapper
> routine for the PLOT command, although the output will
> appear in its own display window.
>
> All complaints, feature requests, etc. should be directed
> to Martin. :-)
>
> I particularly like the little gizmo for positioning
> the plot in the window. Users of PSConfig will be
> familiar with the concept. Let's just say I *knew* that
> code would be useful for something someday!
>
> I should mention that MPI_PLOT is really just an example
> plot to show off the underlying functionality that we
> have been working on. The real guts of the stuff we have
> been doing is to have an interactive way to set plot and
> axis keywords. What we imagine is that people will use
> the more fundamental programs to build their own graphics
> display routines, like MPI_PLOT. But all of this will
> be documented in an upcoming World Premier Release that
> will happen later this year.
>
> 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

--
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org
Re: controlling plot appearance (was "line graph problems") [message #24337 is a reply to message #24336] Tue, 27 March 2001 09:21 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Martin Schultz <martin.schultz@dkrz.de> writes:
> You speak "out of my heart" here. And this is exactly the reason why
> David went ahead recently to develop a graphical tool to set up plot
> properties. Since it concentrates on getting the correct values for
> the myriad of plot keywords, it is not necessarily more "intuitive"
> than these, but at least you get "instant gratification" in that you
> can see what effect a keyword setting has. But if you are a little
> more "anal" in the ay things should look (this is a quote from several
> posts of David), there is really no way around messing with character
> sizes and positions - and here, IDL (at least in direct graphics) does
> a rather lousy job in providing the user with reasonable defaults or
> an easy reference frame. What is clearly missing, I think, is a
> "panel" coordinate system which would have "normal" coordinates with
> respect to a plot, not to the entire window or page.
... other requests removed

I hear you Martin, and I agree with you. We need more control over
our plots sometimes.

It dawned on me that we may not need *more* keywords to PLOT. Rather,
there should be a simple way to piece together a plot from simple
primitives. AXIS is a good start be we need other primitives to
establish coordinate systems and perform data scaling. Instead of
shoehorning more stuff into a monolithic plot command, it should be
easier to compose our own plot from simple elements. *Then*, in the
simple elements we can add these extra features.

In any case, I don't think it matters. RSI probably considers direct
graphics to be the wave of the past.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: controlling plot appearance (was "line graph problems") [message #24339 is a reply to message #24337] Tue, 27 March 2001 09:21 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (btupper@bigelow.org) writes:

> It would be relatively easy to create an plotting object for direct
> graphics (I'm not volunteering for this until I get more than just red
> colors on my display!) New graphics keywords could be added, like your
> YTITLE_SHIFT keyword example. Once you figure out what to do with the
> YTITLE given its SHIFT, you make it a method within the object to handle
> that property. You could introduce other keywords like XSUBTITLE and
> YSUBTITLE. Similar objects could be created for any kind of direct
> graphics routine (I have started a direct graphics contour object a
> number of times... someday I shall finish it... what? it's 2001
> already?)
>
> Here's what it might look like:
>
> MyPlotObj = obj_new('DG_Plot', X, Y, YTITLESHIFT = [-0.1, 0],
> OTHERKEYWORDS = ....)
> MyPlotObj->Plot
> ;ah shoot, forgot to set these
> MyPlotObj->SetProperty, Background = 3, isotropic = 1
> MyPlot->Plot
> ;make a printout
> devicename = !D.name
> Set_plot, 'printer'
> MyPlotObj->Plot
> Device, /Close
> Set_plot, devicename
>
> Obj_destroy, MyPlotObj
>
>
> If it were that simple then would you still say, 'if I can't create a
> plot in one or two lines of code then forget it'? I think that is a
> really important question, (at least I find myself asking this over and
> over before starting a new project.)

Oh, I think it could be made a LOT easier than that!

As Martin and I have alluded to, we have been trying
to develop a program that gives the user a bit more
control over how a plot looks on the display. I guess
it might be time to reveal it and get user feedback.
This is truly version 1.0 of the software. Even we
have some ideas for things it still needs. :-)

And it is not nearly as sophisticated as rotating
axis labels or shifting labels by some small amount.
But I can envision it becoming something like that.
That is to say, I know how to do those kinds of things,
and I believe I could implement it in the object
oriented approach we have used here. But, alas, we
are offering the software for free, so you pretty
much have to take what you get and rely on the kindness
of strangers for updates. :-)

I'll put the program up on my web page for a limited
time, if people want to try it out. The Max-Plank
Institute of Meteorology has provided a small amount
of funding to bring this software to you. I hope you
extend your gratitude to those folks should you ever
run into them.

The program is here:

http://www.dfanning.com/programs/mpi_plot.zip

The program uses a number of files from both the Coyote
Library and Martin's Max-Plank library. I've included
everything you need in the zip file. To try it out, I
recommend you unzip the files in a local directory,
then either CD into that directory from within IDL
(highly recommended) or add the directory to your path
(this could be a problem if you don't have the latest
Coyote or Max Plank files in directories ahead of this
one on the path). To run the program, just type MPI_PLOT.
Or, you can use your own data. This is basically a wrapper
routine for the PLOT command, although the output will
appear in its own display window.

All complaints, feature requests, etc. should be directed
to Martin. :-)

I particularly like the little gizmo for positioning
the plot in the window. Users of PSConfig will be
familiar with the concept. Let's just say I *knew* that
code would be useful for something someday!

I should mention that MPI_PLOT is really just an example
plot to show off the underlying functionality that we
have been working on. The real guts of the stuff we have
been doing is to have an interactive way to set plot and
axis keywords. What we imagine is that people will use
the more fundamental programs to build their own graphics
display routines, like MPI_PLOT. But all of this will
be documented in an upcoming World Premier Release that
will happen later this year.

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: controlling plot appearance (was "line graph problems") [message #24340 is a reply to message #24337] Tue, 27 March 2001 08:03 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Paul van Delst wrote:
>
>
> Maybe not - I don't use OG so I can't really say. However, it does appear from other's
> posts here that the properties available for setting/changing is quite broad. But, and for
> me at least this is a big but, if I can't create a plot in one or two lines of code then
> forget it. I want to look at my data, not set up models, and views, and coordinate
> conversions and what not. PLOT, x, y is the simplicity I'm looking for.

Hello Paul,

It would be relatively easy to create an plotting object for direct
graphics (I'm not volunteering for this until I get more than just red
colors on my display!) New graphics keywords could be added, like your
YTITLE_SHIFT keyword example. Once you figure out what to do with the
YTITLE given its SHIFT, you make it a method within the object to handle
that property. You could introduce other keywords like XSUBTITLE and
YSUBTITLE. Similar objects could be created for any kind of direct
graphics routine (I have started a direct graphics contour object a
number of times... someday I shall finish it... what? it's 2001
already?)

Here's what it might look like:

MyPlotObj = obj_new('DG_Plot', X, Y, YTITLESHIFT = [-0.1, 0],
OTHERKEYWORDS = ....)
MyPlotObj->Plot
;ah shoot, forgot to set these
MyPlotObj->SetProperty, Background = 3, isotropic = 1
MyPlot->Plot
;make a printout
devicename = !D.name
Set_plot, 'printer'
MyPlotObj->Plot
Device, /Close
Set_plot, devicename

Obj_destroy, MyPlotObj


If it were that simple then would you still say, 'if I can't create a
plot in one or two lines of code then forget it'? I think that is a
really important question, (at least I find myself asking this over and
over before starting a new project.)


Ben

P.S. YTITLE_SHIFT? Geez, how would you do that?

--
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org
Re: controlling plot appearance (was "line graph problems") [message #24341 is a reply to message #24340] Tue, 27 March 2001 07:04 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Martin Schultz wrote:
>
> Paul van Delst wrote:
>>
>> Yeah, but recently I have come to the conclusion that IDL is not mature enough to allow me
>> absolute control in a simple, intuitive way of plot properties (note that the qualifier
>> "simple" eliminates OG :o) as opposed to some other proprietary plotting package (like,
>> for e.g., Grapher or Surfer).
>
> You speak "out of my heart" here. And this is exactly the reason why
> David went ahead recently to develop a graphical tool to set up plot
> properties. Since it concentrates on getting the correct values for
> the myriad of plot keywords, it is not necessarily more "intuitive"
> than these, but at least you get "instant gratification" in that you
> can see what effect a keyword setting has. But if you are a little
> more "anal" in the ay things should look (this is a quote from several
> posts of David), there is really no way around messing with character
> sizes and positions - and here, IDL (at least in direct graphics) does
> a rather lousy job in providing the user with reasonable defaults or
> an easy reference frame.

I agree wholeheartedly. I really don't see the problem with providing keywords in the PLOT
command to allow uses to shift the axis labels and tick mark labels using even normalised
coordinates. Would that be hard to do in IDL? If so, why? (These are questions directed
"out there", not targeted at you in particular, Martin). Why can't I do something like:

PLOT, x, y, YTITLE = 'My Y Data', YTITLE_SHIFT = [ -0.1, 0.0 ]

to bump the ytitle *from it's default position which I don't want to have to calculate* to
the left by 0.1 normalised units but keeping it centered vertically?

I don't want to have to use a GUI to make a plot. That's one of the reasons I stopped
using Grapher (for pub quality plots) and moved entirely to IDL. Now that Grapher has a
script language (like Surfer) I may have to revisit that option (but probably not since
Golden software only runs on windoze platforms...at least last time I looked).

> Now, I haven't looked to what
> extent object graphics is going this way, but I fear that - at least
> up to version 5.4 - it has not become easier to tightly control the
> plot appearance if you use object graphics.

Maybe not - I don't use OG so I can't really say. However, it does appear from other's
posts here that the properties available for setting/changing is quite broad. But, and for
me at least this is a big but, if I can't create a plot in one or two lines of code then
forget it. I want to look at my data, not set up models, and views, and coordinate
conversions and what not. PLOT, x, y is the simplicity I'm looking for.

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
paul.vandelst@noaa.gov Alexander Pope.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how do I keep IDL quiet?
Next Topic: Re: JULDAY trivia

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

Current Time: Wed Oct 08 14:01:24 PDT 2025

Total time taken to generate the page: 0.00830 seconds