bar_plot barnames [message #59386] |
Wed, 19 March 2008 12:45 |
Indy
Messages: 1 Registered: March 2008
|
Junior Member |
|
|
Hi All,
I am having a problem with the BARNAMES keyword in BAR_PLOTS. My
array, hours=indgen(24) to represent 0 to 23 hours in a day, is offset
by to the right by just over 1 tick. So the bars line up with the
ticks correctly, but the numbers along the bottom are shifted. The
max is at 1400, but if you just read the numbers along the x-axis,
below, the ticks, you'd interpret this as 1300.
The small bit of plotting code is below...
; Hours Per Day
obs_hours = indgen(24)
;make 2 plots on 1 row 0 remain on the page
!P.MULTI=[0,2,1]
;turns off color table
DEVICE, DECOMPOSED=0
;make axes black
!P.COLOR=2
LOADCT, 3, NCOLORS=24,BOTTOM=1
colorIndices = indgen(24)+1
window, xsize = 1000, ysize = 500
; ADJUST THE Y axis for Hourly FRP
!Y.RANGE = [0,MAX(frp_hourly)*1.1]
bar_plot, frp_hourly, COLORS=colorIndices, BARNAMES=obs_hours, $,
BACKGROUND=255, BARWIDTH=0.75, BARSPACE=0.2, $
TITLE = 'Hourly Total FRP' , $
XTITLE = 'Local Hour (UTC+2)', $
YTITLE = 'FRP(MW)'
|
|
|