This function generates histogram of input data.
AXCEL.VIZ.HISTOGRAM(data, [cumulative], [stacked], [orientation], [bins], [probability], [gap], [title], [deployment])
The AXCEL.VIZ.HISTOGRAM function syntax has the following arguments:
data Required. data must be a minimum of one column. If additional columns are provided, they will be presented in the histogram based on stacked selection.
For non-numeric entries such as Group in above example, you should add “.f” at the end of column name to identify it as factor. Axcel automatically aggregates each factor and display them as a histogram. For instance, in above mentioned dataset, if value1 is a factor variable of a,b,… which is not numerical, we should present this column as follows:
cumulative Optional. Default is FALSE. If set TRUE, a cumulative histogram is generated.
stacked Optional. Default is FALSE which shows multiple histograms data in their corresponding separate bars. You should set it TRUE, if you would like to stack and show them in a single set of bins.
orientation Optional. Default is vertical. If you can set it to [h]orizontal, if you would like to have the charts presented horizontally.
bins Optional. By default, Axcel identifies the best number of bins to generate histogram. However, you can define your bin setup in two ways:
- If you define bins as a single number, Axcel consider as the maximum number of bins and calculates the best bin setup by considering this constraint.
- You can define bins as a vector of [Start, End, Size] as well. In this case, Axcel respects these constraints and define the bins based on this vector of configurations.
probability Optional. Default is FALSE which shows the number of members in each group. If it is set TRUE, the outcome is normalized and the probability of each bin will be presented.
gap Optional. By default, Axcel applies 0.1 gap between bars. You can define yours including 0 to show all bars side by side.
title Optional. By default, Axcel tries to find the title from your data such as the name of the first column. Otherwise, you can explicitly define the title of your graph.
deployment Optional. It is the deployment in project/name or owner/project/name format. You need to create a project by logging into your console (https://console.axcel.io) -> Project -> Create Project. After that you can use the project name in your deployment. Please note project and visualization names contain small letters and numbers only. If a project is shared with you, you should use the username of the owner in your deployment. Please visit visualization projects and sharing to learn more about this powerful feature.
when you type =AXCEL.VIZ.HISTOGRAM in an Excel cell, the IntelliSense guides you through required and optional (shown in  brackets) inputs. Here are examples.
We have three sets of 500 random numbers from a normal distribution with average of 0, 1 and 4 which is located in cells A1 to C501:
Let’s start by showing the histogram of the first column with the title of “Random Samples”:
And here is the output:
Now let’s show the cumulative numbers:
and the output is:
Which results in:
we can limit the number of bins to 10 (10 is the considered the maximum number of bins):
which shows the results in 6 bins:
We can define the bins more specifically. For instance, let’s set the minimum to 0, max 1 with 0.1 steps. We put this specification in cell E4:G4:
and here is the result:
Let’s keep the same specification but normalize the result to show probabilities:
As presented below, Y-axis shows the probabilities instead of number of members in each bin:
Let’s go back to original graph but add Sample2 and Sample 3 columns:
All three samples are shown in separate histograms as shown below:
And, If you would like to stack them:
Lastly, if you would like to show bins without gap:
Which changes the graph as shown below:
See also Visualization Projects and Sharing