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

Home » Public Forums » archive » bar_plot barnames
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
bar_plot barnames [message #59386] Wed, 19 March 2008 12:45
Indy is currently offline  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)'
[Message index]
 
Read Message
Previous Topic: Re: IDL orbit propagator
Next Topic: interpolation/gridding

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

Current Time: Fri Oct 10 13:13:44 PDT 2025

Total time taken to generate the page: 0.96359 seconds