Simple Histogram using Mathematica - please

Click For Summary
To create a simple histogram in Mathematica v7 using the provided data, the command Histogram[data] can be used. However, to customize the histogram with specific column values like 0, 0.5, 1, and so on, and to center the labels beneath each column, users should explore the HistogramCategories option. The original poster noted that options like Ticks -> IntervalCenters are not compatible with version 7, indicating a need for updated commands for this version. Assistance is requested for finding the correct options to achieve the desired histogram customization in Mathematica v7. Understanding these adjustments is essential for effective data visualization in this software.
AaronMartin
Messages
8
Reaction score
0
Hi. I am new to using Mathematica v7 and would like to know how to generate a very simple histogram.

The data is:

data = {1.5, 2, 0, 0.5, 1, 2, 1.5, 3, 0, 0.5, 1, 2, 2, 3, 3.5, 0, 1, 4, 2, 0.5, 1, 0, 2, 1.5, 0, 1.5}

I can generate the histogram using Histogram[data] but how do I set the histogram to generate columns that represent 0, 0.5, 1, 1.5, ... etc with the columns labeled with those values centred underneath each column? Is it possible also to have the x-axis label centred underneath the chart?

Thank you to anyone who can help me out.
 
Mathematics news on Phys.org
You can try something like
Code:
Histogram[data, HistogramCategories -> Range[Min[data], Max[data], 1/2]]
There doesn't seem to be an option to adapt the scale though (I found somewhere the option Ticks -> IntervalCenters, although it gives me errors).
 
Thank you. HistogramCategories and IntervalCenters appears to be in a previous version of Mathematica and not in version 7. If anyone knows what they have been changed to in version 7, I'd appreciate your help!
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 33 ·
2
Replies
33
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K