[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: PSYM=10 problem*From*: Steve Cox <cox(at)siffanto.larc.nasa.gov>*Date*: Tue, 16 Nov 1999 13:09:20 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: NASA Langley Research Center, Hampton, VA, USA*References*: <iSgY3.39227$1v5.925927@newscontent-01.sprint.ca>*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:17306

Laurent Chardon wrote: > > Is there a good reason why the first bin plotted by the plot/PSYM=10 > combination is half the size of all the others? Can I get around this > behaviour? I want all the bins to be of equal size. I've had this problem too, and worked around it by duplicating the first and last elements of the data, and by adding the end points to the bin centers. If data is your histogram data, and binBounds is an array of the histogram bin boundaries: sizeData=N_Elements(data) plotData=[data(0),data,data(sizeData-1)] ;duplicate first and last sizeBinBounds=N_Elements(binBounds) binCenters(i)=FltArr(sizebinBounds-1) FOR i=0,sizeBinBounds-2 DO binCenters(i)=binBounds(i)+binBounds(i+1))/2. ;add highest and lowest bin boundaries to the bin center array binLabels=[binBounds(0),binCenters,binBounds(sizeBinBounds-1)] Plot,binLabels,plotData,PSym=10 I'll trust the maxim that the best way to find out that one's method is needlessly complicated is to post it to comp.lang.idl-pvwave. -Steve Cox

**References**:**PSYM=10 problem***From:*Laurent Chardon

- Prev by Date:
**PSYM=10 problem** - Next by Date:
**Re: Object Widgets** - Prev by thread:
**PSYM=10 problem** - Next by thread:
**Re: PSYM=10 problem** - Index(es):