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

Home » Public Forums » archive » plot titles overflowing EPS bounding box
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
plot titles overflowing EPS bounding box [message #12573] Sun, 16 August 1998 00:00 Go to next message
Brad Gom is currently offline  Brad Gom
Messages: 49
Registered: August 1997
Member
I am trying to do a multi plot to an encapsulated postscript file using
XWINDOW.pro. My problem is that the axis titles keep getting truncated
by the bounding box. Is there a way to ensure that the whole plot
(including titles) fits in the bounding box (or plot window for that
matter)?

thanks
Re: Plot Title [message #42322 is a reply to message #12573] Tue, 01 February 2005 20:01 Go to previous message
pulsifer@bigfoot.com is currently offline  pulsifer@bigfoot.com
Messages: 5
Registered: December 2004
Junior Member
As I was reading about XYOUTS, I found a way to get Plot to do what I
want.

You take the title that you want to use and add '!C'.

tempTitle = title+'!C'

Now plot shifts everything so that it displays correctly and avoids me
having to do the math to position the title and play with fudge
factors. And, it works for printing also.
Thanks for the hints and ideas!

Dean Pulsifer
Re: Plot Title [message #42330 is a reply to message #12573] Tue, 01 February 2005 06:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pulsifer@bigfoot.com writes:

> I am using Plot followed by 2 axis commands to surround my plot with
> axis with tick marks on all four sides.
>
> It works well until I add a title to the Plot command. The title is
> overwritten by one of the axis labels.
>
> I can't find any parameters that let me control the title placement.
> Is there some trick to doing this?

You will have to use XYOUTS to put the title on. Something like
this:

data = Findgen(11)
Plot, data, XStyle=8, YStyle=8, Position=[0.15, 0.15, 0.9, 0.85], $
XTitle='1st X Title', YTitle='1st Y Title'
Axis, YAxis=1, YRange=[0,10], /Save, YTitle='2nd Y Title'
Axis, XAxis=1, XRange=[0,15], /Save, XTitle='2nd X Title'
x = (!X.Window[1] - !X.Window[0]) / 2. + !X.Window[0]
y = 0.92
XYOuts, x, y, 'This is plot title', /Normal, Align=0.5, Charsize=1.5

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Plot Title [message #42331 is a reply to message #12573] Tue, 01 February 2005 05:13 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1107263204.784909.214400@z14g2000cwz.googlegroups.com>,
"pulsifer@bigfoot.com" <pulsifer@bigfoot.com> wrote:

> I am using Plot followed by 2 axis commands to surround my plot with
> axis with tick marks on all four sides.
>
> It works well until I add a title to the Plot command. The title is
> overwritten by one of the axis labels.
>
> I can't find any parameters that let me control the title placement.
> Is there some trick to doing this?

I think you will have to write the title with XYOUTS.

Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NULL value in IDL ?
Next Topic: Re: Color behavior when using TEXTURE MAP

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

Current Time: Sun Oct 12 11:53:50 PDT 2025

Total time taken to generate the page: 0.64034 seconds