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

Home » Public Forums » archive » Re: Stackplot without 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
Re: Stackplot without axis? [message #45869] Mon, 10 October 2005 11:22
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Thanks, David. I will try to figure out. Have a nice trip!
Caitouer
Re: Stackplot without axis? [message #45870 is a reply to message #45869] Mon, 10 October 2005 11:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
caitouer writes:

> Thanks, David. I checked your code. The two figures are
> plotted in the save plotting area. What I hope to do is to
> plot the lines one box after another box. Some thing like
> this:
> www.engin.umich.edu/~xcai/test_stack.ps

Humm. I don't see any axes in that plot. Just lines. Maybe
what you are looking for is PLOTS, not AXIS.

> Here, I plotted stackplot of sin(x), cos(x) and cos(x). The
> plotting area is different for each plot. I want to add xaxis
> fot the whole figure. By the way, can I add one vertical line
> for the whole figure? Right now, I add the vertical line in
> each box seperately.

I'm just leaving my office (for about 5 weeks), so I probably
can't help much. If I wanted a single x-axis for three plots,
I would draw the first plot with XSTYLE=8, the second and
third plot with XSTYLE=4, and then put the final axis on
top with AXIS, XAXIS=1 after I drew the 3rd plot.

The Y axis is more problematical, but I illustrate one way
to handle it in the article I had you read.

Vertical lines can be drawn anywhere and anytime with PLOTS.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Stackplot without axis? [message #45871 is a reply to message #45870] Mon, 10 October 2005 10:51 Go to previous message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Thanks, David. I checked your code. The two figures are
plotted in the save plotting area. What I hope to do is to
plot the lines one box after another box. Some thing like
this:
www.engin.umich.edu/~xcai/test_stack.ps
Here, I plotted stackplot of sin(x), cos(x) and cos(x). The
plotting area is different for each plot. I want to add xaxis
fot the whole figure. By the way, can I add one vertical line
for the whole figure? Right now, I add the vertical line in
each box seperately. I really appreciate your help.
Caitouer
Re: Stackplot without axis? [message #45874 is a reply to message #45871] Mon, 10 October 2005 10:05 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
caitouer writes:

> Thanks for your quick reply! It becomes easy with deleting axis
> between figures now ( I can not believe how easy it is : o ). But
> how about if I want to add xaxis and yaxis for the stackplot? I failed
> by doing this:
>
> ------------------------------------------------------------ ------------------
> ;How can I use 'norm' in axis?
> axis, xaxis=0,0,0,/norm
> axis, xaxis=1,0,1,/norm
> axis, yaxis=0,0,0,/norm
> axis, yaxis=1,1.0,/norm
>
> ------------------------------------------------------------ ------------------

Once you execute a PLOT command the "data" coordinate
system is established. So now you can issue an AXIS command
and the command will know where to draw the plot. I seriously
doubt whether you want to be doing this in normalized
coordinates, as you are here.

Your code will look more like the code in this article:

http://www.dfanning.com/tips/another_yaxis.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Stackplot without axis? [message #45875 is a reply to message #45874] Mon, 10 October 2005 08:51 Go to previous message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Thanks, Mike! It works!
Re: Stackplot without axis? [message #45876 is a reply to message #45875] Mon, 10 October 2005 08:51 Go to previous message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Thanks for your quick reply! It becomes easy with deleting axis
between figures now ( I can not believe how easy it is : o ). But
how about if I want to add xaxis and yaxis for the stackplot? I failed
by doing this:

------------------------------------------------------------ ------------------
;How can I use 'norm' in axis?
axis, xaxis=0,0,0,/norm
axis, xaxis=1,0,1,/norm
axis, yaxis=0,0,0,/norm
axis, yaxis=1,1.0,/norm

------------------------------------------------------------ ------------------
Thanks again!
Caitouer
Re: Stackplot without axis? [message #45878 is a reply to message #45876] Mon, 10 October 2005 08:28 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
plot, x, y, XSTYLE=4

That will suppress the entire X axis.

-Mike
Re: Stackplot without axis? [message #45879 is a reply to message #45878] Mon, 10 October 2005 08:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
caitouer writes:

> I tried to plot stackplot with several lines. Basically,
> I hope to get something like when you use !P.MULTI=[0,1,2]
> to plot the figure one after another. But I do not want
> to plot the XAXIS between the figures. Can I hide the axis
> by some way? Here is my "silly" try:
> ----------------------------------------------------
> Though I almost got what I want, it is painful! Any better
> way to do this?

Oh, yes, there are *much* better ways. :-)

Here is an example of a "stacked" plot:

http://www.dfanning.com/graphics_tips/ladder_plot.html

You can turn off the XAXIS with XSTYLE=4. Or turn off box
axes with XSTYLE=8, etc.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: find the maximum diameter of an object in an image
Next Topic: g++ with IDL call_external

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

Current Time: Fri Oct 10 14:32:09 PDT 2025

Total time taken to generate the page: 1.44717 seconds