Simple Histogram using Mathematica - please

AI Thread 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!
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...

Similar threads

Replies
2
Views
2K
Replies
9
Views
3K
Replies
1
Views
2K
Replies
3
Views
2K
Replies
3
Views
3K
Replies
33
Views
2K
Back
Top