cgBarplot and Titles [message #88020] |
Wed, 12 March 2014 15:41  |
limiqt
Messages: 27 Registered: October 2013
|
Junior Member |
|
|
Dear All,
I need to include titles in several barplots graphs. However the titles do not appear. I wonder what I am doing wrong. I have also tried with /overplot and /window. I need to use pos. Does someone has any suggestion?
Thanks, Lim
Pro whereistile
data=[2,3,4,5]
Titles=['Data1', 'Data2', 'Data3', 'Data4']
pos = cgLayout([2,2], OXMargin=[3, 3], OYMargin=[2, 2], XGap=5, YGap=5)
cgwindow
For i=0, 3 DO Begin
cgBarplot, data[i], BarNames=labels,YRange=[0,10], Title=Titles(i),$
Colors=Colores, Position=pos[*,i], /noerase, /AddCMD
EndFor
End
|
|
|
Re: cgBarplot and Titles [message #88021 is a reply to message #88020] |
Wed, 12 March 2014 15:51  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lim writes:
>
> Dear All,
> I need to include titles in several barplots graphs. However the titles do not appear. I wonder what I am doing wrong. I have also tried with /overplot and /window. I need to use pos. Does someone has any suggestion?
> Thanks, Lim
>
> Pro whereistile
> data=[2,3,4,5]
> Titles=['Data1', 'Data2', 'Data3', 'Data4']
> pos = cgLayout([2,2], OXMargin=[3, 3], OYMargin=[2, 2], XGap=5, YGap=5)
> cgwindow
> For i=0, 3 DO Begin
> cgBarplot, data[i], BarNames=labels,YRange=[0,10], Title=Titles(i),$
> Colors=Colores, Position=pos[*,i], /noerase, /AddCMD
> EndFor
> End
Where there is great power, comes great responsibility. :-)
Try this, instead:
Pro whereistile
data=[2,3,4,5]
Titles=['Data1', 'Data2', 'Data3', 'Data4']
!P.Multi=[0,2,2]
For i=0, 3 DO Begin
cgBarplot, data[i], BarNames=labels,YRange=[0,10], $
Title=Titles, Colors=Colores
EndFor
!P.Multi=0
End
cgWindow, 'whereistile'
END
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|