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

Home » Public Forums » archive » Re: PSYM=10 problem
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: PSYM=10 problem [message #17829 is a reply to message #17827] Tue, 16 November 1999 00:00 Go to previous message
Steve Cox is currently offline  Steve Cox
Messages: 3
Registered: November 1999
Junior Member
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
[Message index]
 
Read Message
Read Message
Previous Topic: Command input window in Windows: why only one line?
Next Topic: Re: Command input window in Windows: why only one line? Why, generally does the windows handling not work?

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

Current Time: Sun Nov 30 21:04:58 PST 2025

Total time taken to generate the page: 0.87767 seconds