plot titles overflowing EPS bounding box [message #12573] |
Sun, 16 August 1998 00:00  |
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  |
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  |
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/
|
|
|
|