-
MathType
-
Wiris Quizzes
-
Learning Lemur
-
CalcMe
-
MathPlayer
-
Store FAQ
-
VPAT for the electronic documentation
-
MathFlow
-
BF FAQ
Histogram
Reading time: 1minHistograms are often used to visually represent continuous data.
Syntax
histogram(Statistics_data)
Description
It draws a histogram for a data sample.
![]() |
![]() |
Options
Option | Description | Format | Default value |
---|---|---|---|
axis_label | A list of two labels for the x and y axes. | Two Strings {x_label,y_label} . |
{,} |
close_right | When set to true , the histogram uses intervals closed on the right (i.e (a,b] ). When false , it uses intervals closed on the left. |
Boolean | true |
color | Sets the color of the outline of the histogram bars. | RGB list of values {r,g,b} where r, g, and b are integers between 0-255. Alternatively, one of the following strings: black, white, red, green, blue, cyan, magenta, yellow, brown, orange, pink, grey, dark_grey, light_grey, or one of the HTML colors, by name (e.g. html_indigo rather than 4b0082). |
{180,60,0} |
fill_color | Sets the color of the inside of the histogram bars. | Same as the color option above. |
{255,200,0} |
frequencies | When set to true, the y-axis shows the absolute frequency of the values on the x-axis. When false, the y-axis shows relative frequency. | Boolean. | true |
intervals | Use this option to specify where histogram bars are delimited. | List of the exact values where histogram bars start and end, an algorithm that computes those values ("Sturges" , "FD" or "Scott" ), or a suggested number of boxes. |
"Sturges" |
show_axis | When set to true, it shows both x and y axes. If false, it shows no axes. | Boolean. | true |
show_label | When set to true, it shows a label above each bar with the corresponding y-value. | Boolean. | false |
title | Title to be displayed above the histogram. | String. |
"" (empty string) |
x_limits | List of two numbers to be used as the minimum and maximum values displayed on the x-axis. | Two Floats {a,b}
|
{} |
y_limits | List of two numbers to be used as the minimum and maximum values displayed on the y-axis. | Two Floats {a,b}
|
{} |