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

Re: PSYM=10 problem




Liam Gumley <Liam.Gumley@ssec.wisc.edu> writes:
> 
> 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.
> 
> A few months ago in this newsgroup, David Fanning convinced me that
> PSYM=10 would never give an accurate representation of a histogram, and
> that the only way to do it right is to plot the histogram yourself. As
> you've noted, the problem is getting the edges of the bins in the right
> position. I came up with the following procedure which I believe
> computes and plots a 'correct' histogram (let me know if I'm wrong!):

Thanks to Liam for his sample program.  I also have a histogram
plotter called PLOTBIN.  While it leaves the histogramming to you
(unlike Liam's), it does a pretty good job of actually plotting the
right thing.

It is distinguished by the ability to plot bins of different widths,
which is especially nice on log-log graphs.  You can specify a single
binsize with the WIDTH keyword, or give a vector of widths, one for
each bin.

Craig
http://cow.physics.wisc.edu/~craigm/idl/idl.html

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------