Message Boards Message Boards

0
|
3347 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Doing a histogram - seting chartlabels

Posted 10 years ago

Dear friends,

I have two data that I use to build the following histogram code:


HistMagEstac = 
 BarChart[{eventosporclasses}, 
  ChartLabels -> Placed[Classes, Below, Rotate[#, Pi/2.4] &], 
  ChartElementFunction -> "ObliqueRectangle", 
  PlotLabel -> 
   Style["Distribuição de magnitudes (2014) ->  atualização de: " <> 
     DateString[{"Day", "/", "Month", "/", "Year", " às ", 
       "HourShort", ":", "MinuteShort"}], "Title", 16], 
  ColorFunction -> Function[{height}, ColorData["Rainbow"][height]], 
  AxesLabel -> {Style["Mag/10", 12, Bold], 
    Style["Total de mag. por classe", 12, Bold]}, 
  LabelingFunction -> Above, ImageSize ->  800]

But, when the histogram is done, labels related to zero values, are not being written: see the attachment

Am I doing something wrong? (also , I`d like to set the labels in the middle of each class limits)

The data set:

  eventosporclasses =   {0, 1, 2, 1, 5, 5, 3, 5, 15, 30, 50, 115, 248, 581, 1063, 1606, 2022, \
    1584, 1027, 862, 1095, 823, 361, 65, 7, 1, 0, 1, 0, 4, 7, 0, 6, 14, \
    3, 0, 1};



 Classes = {"-80 a -76", "-75 a -71", "-70 a -66", "-65 a -61", 
       "-60 a -56", "-55 a -51", "-50 a -46", "-45 a -41", "-40 a -36", 
       "-35 a -31", "-30 a -26", "-25 a -21", "-20 a -16", "-15 a -11", 
       "-10 a -6", "-5 a -1", "00 a 4", "5 a 9", "10 a 14", "15 a 19", 
       "20 a 24", "25 a 29", "30 a 34", "35 a 39", "40 a 44", "45 a 49", 
       "50 a 54", "55 a 59", "60 a 64", "65 a 69", "70 a 74", "75 a 79", 
       "80 a 84", "85 a 89", "90 a 94", "95 a 99", "100 a 105"};
Attachments:
POSTED BY: Updating Name
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