Message Boards Message Boards

GROUPS:

Plot multi histogram in one image, where the bins are real numbers?

Posted 1 month ago
234 Views
|
1 Reply
|
0 Total Likes
|

Hi, I tried to plot the attached data with no success - can some one please advise? I try with

Histogram[Flatten[Table[i, {i, Length[bincounts ]}, {j, bincounts [[i]]}]]]

, but it plot the X axis from 1-20, instead of -099-0.64 Thanks!

data  = {0,0,0,0,0,0,0,0,0,0,2,0,1,2,2,5,1,3,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
data2 = {0  ,0   ,0    ,0 ,0  ,1   ,0    ,0 ,0  ,0   ,3    ,1 ,4  ,5   ,1    ,3 ,1  ,1   ,0    ,0 ,0  ,0   ,0    ,0 ,0  ,0   ,0    ,0 ,0  ,0   ,0    ,0 ,0  ,0   ,0    ,0 }
bins = {-0.99   ,-0.98    ,-0.97 ,-0.96  ,-0.95   ,-0.94    ,-0.93 ,-0.92  ,-0.91,  -0.9 ,-0.89  ,-0.88   ,-0.87    ,-0.86 ,-0.85  ,-0.84   ,-0.83    ,-0.82 ,-0.81  ,-0.8    ,-0.79 ,-0.78  ,-0.77   ,-0.76    ,-0.75 ,-0.74  ,-0.73,  -0.72    ,-0.71 ,-0.7   ,-0.69    ,-0.68,    -0.67  ,-0.66   ,-0.65    ,-0.64 }

@Yossi Rab: Are you expecting the histogram to show counts in the negative bin values? None of the data is negative so there will be nothing in those bins. Sorry, but I unfortunately don't understand what you are trying to do.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract