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

Home » Public Forums » archive » cgBarplot and Titles
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
cgBarplot and Titles [message #88020] Wed, 12 March 2014 15:41 Go to next message
limiqt is currently offline  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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Density color slices classic envi
Next Topic: use ENVI classic functions in IDL without openning ENVI GUI

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

Current Time: Wed Oct 08 13:36:44 PDT 2025

Total time taken to generate the page: 0.00463 seconds