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

Home » Public Forums » archive » Re: getting ytitle to span many plots
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: getting ytitle to span many plots [message #47443] Sun, 12 February 2006 07:51 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Panter writes:

> Although the best solution is almost certainly to directly specify
> POSITION keywords for the plots (with a /NOERASE for the second), then
> XYOUTS as David suggests, you might have a go at padding the ytitle of
> one of the plots with spaces. It's a rough and ready, clunky solution,
> but it might just work.
>
> y_tit=' y'
>
> !p.multi=[0,1,2]
> plot, datax1, datay1, xtitle='x1'
> plot, datax2, datay2, xtitle='x2', ytitle=y_tit

Oh, dear. I think it is time for an intervention. Here, I
came up with this in less than a minute:

!P.MULTI=[0,1,2]
Plot, Findgen(101), YTITLE="", XTitle='Stuff'
ytop = !Y.Window[0]
Plot, Findgen(10), YTITLE="", XTitle='More Stuff'
ybot = !Y.Window[1]
XYOuts, !X.Window[0]-0.05, (ytop-ybot)/2 + ybot, $
'The Y Title', Alignment=0.5, Orientation=90, /Normal
!P.MULTI=0

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: getting ytitle to span many plots [message #47444 is a reply to message #47443] Sat, 11 February 2006 23:22 Go to previous messageGo to next message
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Brigette Hesman wrote:
> I have tried the MULTIPLOT program listed here but it requires that
> there be no labelling of the two x-axis... I need to be able to label
> the x-axis separately. It is just the y-axis title that I want to
> change. I want it to be centered between the two plots so it does not
> get duplicated twice. Does anyone have any ideas?

Although the best solution is almost certainly to directly specify
POSITION keywords for the plots (with a /NOERASE for the second), then
XYOUTS as David suggests, you might have a go at padding the ytitle of
one of the plots with spaces. It's a rough and ready, clunky solution,
but it might just work.

y_tit=' y'

!p.multi=[0,1,2]
plot, datax1, datay1, xtitle='x1'
plot, datax2, datay2, xtitle='x2', ytitle=y_tit

Ben

--
Ben Panter, Garching, Germany.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
Re: getting ytitle to span many plots [message #47448 is a reply to message #47444] Fri, 10 February 2006 20:59 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

> Adobe Illustrator. Seriously, write the file as Postscript, open in
> Illustrator, make it look good.

I've got to tell you, this is one wacky newsgroup.
No wonder RSI doesn't want to have anything to do with
us! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: getting ytitle to span many plots [message #47449 is a reply to message #47448] Fri, 10 February 2006 18:51 Go to previous messageGo to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <1139611727.460614.253760@g44g2000cwa.googlegroups.com>,
"Brigette Hesman" <bhesman@gmail.com> wrote:

> I have tried the MULTIPLOT program listed here but it requires that
> there be no labelling of the two x-axis... I need to be able to label
> the x-axis separately. It is just the y-axis title that I want to
> change. I want it to be centered between the two plots so it does not
> get duplicated twice. Does anyone have any ideas?

Adobe Illustrator. Seriously, write the file as Postscript, open in
Illustrator, make it look good.

Cheers, Ken Bowman
Re: getting ytitle to span many plots [message #47452 is a reply to message #47449] Fri, 10 February 2006 14:56 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brigette Hesman writes:

> It is just the y-axis title that I want to
> change. I want it to be centered between the two plots so it does not
> get duplicated twice.

A clear job for XYOUTS. It shouldn't take more than
an hour or so to figure out where to put the damn thing. :-)

Be aware that after you draw a plot, the system variables
!X.Window and !Y.Window are set to the location of the plot
axes, in normalized coordinates. That will help, maybe.
Then you should know there is an ORIENTATION keyword to
XYOUTS that allows you to rotate the text.

Good luck and God speed!

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: getting ytitle to span many plots [message #47527 is a reply to message #47443] Mon, 13 February 2006 07:43 Go to previous message
Brigette Hesman is currently offline  Brigette Hesman
Messages: 4
Registered: February 2006
Junior Member
David Fanning wrote:

> !P.MULTI=[0,1,2]
> Plot, Findgen(101), YTITLE="", XTitle='Stuff'
> ytop = !Y.Window[0]
> Plot, Findgen(10), YTITLE="", XTitle='More Stuff'
> ybot = !Y.Window[1]
> XYOuts, !X.Window[0]-0.05, (ytop-ybot)/2 + ybot, $
> 'The Y Title', Alignment=0.5, Orientation=90, /Normal
> !P.MULTI=0
>

Thanks David... it works perfectly!
Re: getting ytitle to span many plots [message #47539 is a reply to message #47448] Sun, 12 February 2006 11:27 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.1e571d31cc8a269e989b7e@news.frii.com...
> Kenneth P. Bowman writes:
>
>> Adobe Illustrator. Seriously, write the file as Postscript, open in
>> Illustrator, make it look good.
>
> I've got to tell you, this is one wacky newsgroup.
> No wonder RSI doesn't want to have anything to do with
> us! :-)



Good thing I didn't post my solution of printing out the
plots and writing the title by hand on the paper, then scanning
it back into the computer. :o



-bob
Re: getting ytitle to span many plots [message #47540 is a reply to message #47448] Sun, 12 February 2006 09:57 Go to previous message
William Daffer is currently offline  William Daffer
Messages: 34
Registered: February 1999
Member
David Fanning <davidf@dfanning.com> writes:

> Kenneth P. Bowman writes:
>
>> Adobe Illustrator. Seriously, write the file as Postscript, open in
>> Illustrator, make it look good.
>
> I've got to tell you, this is one wacky newsgroup.
> No wonder RSI doesn't want to have anything to do with
> us! :-)
>

You want wacky? I'll give you wacky!

How about putting the title on using LaTeX?

Don't laugh, I have legacy operational scripts that do precisely
that.

whd
--
BASTINADO, n. The act of walking on wood without exertion.
-- Ambrose Bierce: _The Devil's Dictionary_
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: multi-dimensions in IDL
Next Topic: getting ytitle to span many plots

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

Current Time: Fri Oct 10 12:21:40 PDT 2025

Total time taken to generate the page: 0.47894 seconds