Re: A single title, xtitle and ytitle [message #81067] |
Fri, 10 August 2012 13:28  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Marta Yebra writes:
> Do you know how can I put a single plot title, x-title and y-title in a multiplot created with cgplot and the layout keyword? I cannot find the answer myself
> I would really appreciate your help.
I would try something like this:
ymargin = !Y.OMargin
!Y.OMargin=[3,5]
cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,1]
cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,2]
cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,3]
cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,4]
cgText, 0.55, 0.85, Alignment=0.5, /Normal, $
'This is the Plot Title', Charsize=cgDefCharsize()*1.25
cgText, 0.1, 0.5, Alignment=0.5, /Normal, $
Orientation=90, 'This is the Y Title'
cgText, 0.55, 0.1, Alignment=0.5, /Normal, $
'This is the X Title'
!Y.OMargin = ymargin
END
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|
Re: A single title, xtitle and ytitle [message #81193 is a reply to message #81067] |
Sun, 19 August 2012 18:54  |
Marta Yebra
Messages: 16 Registered: August 2012
|
Junior Member |
|
|
On Saturday, 11 August 2012 06:28:49 UTC+10, David Fanning wrote:
> Marta Yebra writes:
>
>
>
>> Do you know how can I put a single plot title, x-title and y-title in a multiplot created with cgplot and the layout keyword? I cannot find the answer myself
>
>> I would really appreciate your help.
>
>
>
> I would try something like this:
>
>
>
> ymargin = !Y.OMargin
>
> !Y.OMargin=[3,5]
>
> cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,1]
>
> cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,2]
>
> cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,3]
>
> cgplot, cgdemodata(1), xtitle='', ytitle='', layout=[2,2,4]
>
> cgText, 0.55, 0.85, Alignment=0.5, /Normal, $
>
> 'This is the Plot Title', Charsize=cgDefCharsize()*1.25
>
> cgText, 0.1, 0.5, Alignment=0.5, /Normal, $
>
> Orientation=90, 'This is the Y Title'
>
> cgText, 0.55, 0.1, Alignment=0.5, /Normal, $
>
> 'This is the X Title'
>
> !Y.OMargin = ymargin
>
> END
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Cool! Thanks
|
|
|