X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06 Mar 2015 08:01 AM by  anon
histogram question
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
06 Mar 2015 08:01 AM
    hi here is a example code data = [0, 0.3, 1.3d] h1 = HISTOGRAM(data, nbin=3, min=0, max=1, loc=loc1) h2 = HISTOGRAM(data, binsize=0.5d, min=0, max=1, loc=loc2) print, h1 print, h2 h1 = 2 0 1 h2 = 2 0 0 h1 and h2 is not equal!! is it correct?? thanks

    Deleted User



    New Member


    Posts:21
    New Member


    --
    09 Mar 2015 01:35 PM
    Hi, Yes, this is correct. If you look in the HISTOGRAM documentation for the MAX keyword, it has the following note: Note: " style="margin: 6pt 0px; font-size: 9pt; color: #454545; font-family: Verdana, Arial, Helvetica, San-Serif;">Note: If NBINS is specified, the value for MAX will be adjusted to NBINS*BINSIZE + MIN. This ensures that the last bin has the same width as the other bins. So, in your first case, because you specified NBIN, then it adjusted your MAX value to be from 1.0 to 1.5, which includes your 1.3 value. In the second case, it didn't adjust the MAX value, so the 1.3 value is ignored. Hope this helps. Cheers, Chris
    You are not authorized to post a reply.