# Questions tagged [histograms]

Tag for questions about building histograms in Mathematica. Apart from generating the graphics, and prettifying them, this also includes methods to extract their data.

332 questions
Filter by
Sorted by
Tagged with
10k views

### Problems specifying number of bins in Histogram

So I wanted to create a Histogram with a custom number of bins. Luckily there is a simple function for this in the form of Histogram[data, n] where n specifies the ...
2k views

### Removing a histogram's vertical edges

Let's say I have a histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] How can I remove vertical lines inside the histogram and keep only the ...
3k views

### How can I make a heatmap of a days in year?

I know Mathematica has a ListPlot for time series but does it have a function for visualizing a list of dates as a heat map like this: This idea is from D3, check it out here.
3k views

### How do I plot a histogram with hatched shading?

I can plot an ordinary histogram with blue shading and black borders like this: T = RandomVariate[NormalDistribution[0, 1], 10000]; Histogram[T, 30] And I can ...
6k views

### Circular Plot and Circular Histogram

The spherical or circular data arises when we measure data in degree e.g wind direction, clock and compass etc. Then representation of such data we need to plot circular plot, circular histogram and ...
2k views

### Finding the best way to visualize rather complicated data

I have the following data ...
855 views

### Elegantly pairing up mismatched lists

HistogramList returns a list of bin boundaries and a list of counts. There is one more boundary than counts, and I'd like to pair them up so I can feed it into <...
3k views

### How to find major color in a picture?

I want to find the major color (the color which appears most often) in a picture and do some analysis later. For example, if I have this picture: What I want to do is find out that gray, red, black, ...
2k views

### ColorFunction in Histogram[]

Let's say I have a Histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] and I want the bars positioned to the ...
2k views

### How can I create facetted histograms?

I love Mathematica, and I would love to be able to use it for all of my data analysis tasks, but there is one type of analysis which I find almost trivial in R, and I have no idea how to approach in ...
3k views

### Make a density list plot/histogram from large, pre-binned data set?

I have a large data set consisting of $\mathcal{O}(10^9)$ two-dimensional points. In order to save memory and time I have pre-binned these into a uniform grid of $500 \times 500$ bins using Fortran. ...
1k views

### How to plot paired smooth histogram/distribution plots?

I've been trying to get paired distribution (aka "violin") plots like those shown below for a few hours, but all my attempts have failed. The key features here are paired smooth histograms/...
2k views

### How can I tell mathematica to generate an histogram from nominal data?

If I write: Histogram[{1, 1, 1, 2, 2, 2}] I get a nice histogram chart but if I write ...
537 views

### Histogram3D with various colors and textures on cuboids' faces

I'm trying to produce an Histogram3D-like graph, but with a little more customization. In particular I want to manually specify the color of each cuboid and to print some information on the top faces....
382 views

I am preparing some data for dissemination. I have a series of plots that look like so, using ListLinePlot: The background shading is just being added using ...
1k views

### Map of United States as a 3D histogram

By combining the state data from here and the extrusion code from here I have managed to make prisms of the various US states such as However, the extrusion method looses information about the ...
555 views

### Color Histogram3D by Bin Location

I am using a Histogram3D plot to view the correlation of the R & G of an RGB image. Naturally, I want the bins to have a color corresponding to their $x$, $y$ (...
1k views

### How to rebuild original data from a histogram?

I have data in the following form. I have a list of values and a list of frequencies that indicate how often each value has occurred. Example list of values: ...
5k views

### Histogram of a very large dataset?

I have a very large dataset stored in a file (over 2GB). The file contains a tab-separated table of floating-point numbers. I want to do an Histogram of all the numbers in the table. But if I try to ...
5k views

### How to make a multi-peak histogram fitting

I got a multipeak histogram from my data and want to fit it using a Gaussian Distribution function. ...
2k views

I'd like to modify this chart to relocate the z axis label so it's not over printing the values. ...
573 views

### Is there a way to make a bihistogram plot?

Is there a way of making a bihistogram plot in mathematica? There is a reference to it at http://mathworld.wolfram.com/Bihistogram.html but no suggestions as to how to do it.
260 views

### Constructing a ternary histogram

so this is currently what I'm building ...
2k views

### Trying to fit an unknown extreme distribution

First up, I'm quite new to Mathematica so any hints on better code would be greatly appreciated. I have some histogram frequency data from an unknown distribution that I'm trying to fit. Here's the ...
1k views

### Mathematica: Retrieving PlotRange from Histogram

I know that one can retrieve PlotRange of a plot by using AbsoluteOptions[plot,PlotRange] but that won't work on ...
190 views

### Generic way for Dynamic style Directives in Histogram or DateHistogram

Let's say I have two samples: ...
580 views

### Can Mathematica achieve this diagram?

Can Mathematica be used to create diagrams of drift diffusion of the kind shown, including histograms showing the response-time distributions? The distributions capture the time taken by a random ...
690 views

### Representative Smooth Kernel Distribution from Truncated Distribution

I am trying to produce a better distribution from a dataset that is bounded to be greater than 0. Here is an example distribution from the documentation that mimics the behavior of the actual dataset: ...
2k views

### Histogram with Error bars

I have a dataset for which Mathematica easily creates a Histogram. However I also need Mathematica to show error bars corresponding to 3 standard deviations for ...
9k views

### How do I display a histogram with normalized counts?

I have some data corresponding to real number distances: {200.04053, 200.232123, 156.3242,...}, and I would like to bin these values and display them as a histogram ...
1k views

### Histogram “PDF” vs “Probability”

I have a discrete random variable with values from $0$ to $100$. I have plotted its histogram with bars centered in $0, 5, 10,\dots,100$. First I made the histogram using the ...
1k views

### Scale SmoothHistogram curve to Histogram

Like in this question, I would like to display a histogram and a smooth histogram in the same plot. I believe the default “bin height specification” (or $\textit{hspec}$) for ...
2k views

### Rapidly binning 3D data

I have a set of data (about 20 million datapoints for my real data) of the form {x, y, z, m}. There are 3 spatial coordinates x, ...
1k views

### How can we create a histogram distribution from binning data?

HistogramDistribution takes a list of data points, creates a histogram from them, and returns this histogram in a form that can be used as a distribution. I ...
200 views

### HistogramList for DateHistogram?

HistogramList and Histogram are closely related: ...
2k views

### How can I make a list plot with bars?

Can anyone help me please? I don't want a Histogram; I don't want a BarChart, not even a ListPlot with drop down lines. I want a list plot with drop down columns/bars: please see the link. It is ...
293 views

### How to specify Log10 bin height scale in GeoHistogram function?

I have some data that is heavy tailed (density of geocoded entities), and I want to use the GeoHistogram function to plot it, but with a log scale. Data can be ...
174 views

### Datasets and Time Values: Filtering and Plotting

After struggling for a few weeks, I have accumulated a few examples of challenging date-related operatations with datasets. Some I have partial solutions; others I cannot yet do. The resources on ...
140 views

### How to get DensityHistogram bins like GeoHistogram bins?

Version 11 introduced GeoHistogram. It creates bins that align the edges with certain shapes. DensityHistogram can also use ...
1k views

### Polar histogram

I am developing an algorithm to generate a descriptor of a 2D object based on polar histogram. suppose that we have a datalist centered in {cx,cy}. I use 36 bins where I consider 12 angles and 3 ...
1k views

### How to create a bar chart from a list of heights *and* bin delimiter positions?

Basically, I'm trying to produce the same output that Histogram[giganticList] would produce, but starting from the output of ...
1k views

### Comparing 2 Data Sets in a Single Plot

I have 2 data sets, data1 and data2 with large (in the thousands) amounts of data and I want to compare them in a plane. They ...
496 views

### Bar chart scale in multi-chart visualisation

This is a rewording of a previous question which probably wasn't very well explained, and so didn't get any responses(!). I'm trying to create a chart which shows the smooth kernel distribution of ...
1k views

### Smooth/histogram a 2D set

I have a 2D dataset like this one: {{x1,y1}, {x2,y2},...} I need to smooth/histogram the data in such a way that binning is over the x-coordinate, while counting/...
289 views

### Controlling the size of Histogram in PlotLegends -> Histogram

I stumbled across this in the Mathematica documentation and thought it was pretty nifty except that the Histogram that appears as the plot legend is too small so the numbers on the histogram overwrite ...
95 views

### DateHistogram FrameLabel overlaps FrameTicks

Bug introduced in 11.3 or earlier and persisting through 12.1.0 ...
847 views

### Combining histograms with a scatter plot

I'm trying to combine graphics using Grid such that I have a ListPlot[] in the middle and a histogram on the top and right axes. ...
141 views

### Histogram not plotting RandomVariate of EmpiricalDistribution

Bug introduced in 11.1 or earlier and fixed in 11.2 I have a seemingly odd case in 11.1 where a sample from an EmpiricalDistribution is not being plotted by ...