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

Home » Public Forums » archive » Bar plotting in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Bar plotting in IDL [message #87267 is a reply to message #87263] Wed, 22 January 2014 07:30 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> cgBarPlot,ydata,BARCOORDS=xnos,XStyle=1, $
> XTitle=xtitle4,YTitle=ytitle4,Font=-1, $
> YRange=[0,100],XRange=[0,100], $
> colors=['cornflower blue'],/Overplot

> (1) CGAXIS -> Keyword array parameter XTICKNAME must have from 1 to 60 elements.

The BARCOORDS keyword is the value or name of each bar on your barplot. The bars are labelled with the XTICKNAME to cgAxis. IDL only allows up to 60 tick names while your "xnos" variable has more than 60 elements. Try picking a smaller subset of your data so that data points are binned into the bars. Otherwise each bar will have exactly 1 data point in it.

(also, try xnos = indgen(100)+1)


> (2) I get the figure with bars but I don't see my xnos or x-axis labels are matching with my xnos. For example, the last value of ydata is 90 and the bar for this value is shown at an xnos=94.

I expect that fixing the first issue will fix this one too.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Plotting points in fainter color on an IDL plot
Next Topic: binning a point clouds in the xy plane

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

Current Time: Wed Oct 08 14:11:03 PDT 2025

Total time taken to generate the page: 0.00497 seconds