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

learn more… | top users | synonyms

20
votes
3answers
1k 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.
14
votes
6answers
1k 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, ...
14
votes
4answers
548 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 ...
14
votes
3answers
832 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 ...
14
votes
4answers
2k 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 ...
14
votes
2answers
675 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 ...
13
votes
7answers
1k views

Finding the best way to visualize rather complicated data

I have the following data ...
11
votes
4answers
278 views

Background Shading in Histogram3D

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 ...
11
votes
2answers
291 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$ ...
11
votes
2answers
781 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 ...
11
votes
1answer
1k 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. ...
8
votes
3answers
524 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: ...
8
votes
2answers
797 views

ColorFunction in Histogram[]

Let's say I have a Histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] and I want the bars positioned to ...
8
votes
1answer
154 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 ...
8
votes
2answers
781 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, ...
7
votes
1answer
522 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 Histogram. Here an example: ...
6
votes
3answers
792 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 ...
6
votes
3answers
356 views

AxesLabel in Histogram3D unreadable

I'd like to modify this chart to relocate the z axis label so it's not over printing the values. ...
6
votes
1answer
218 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: ...
6
votes
3answers
256 views

Calculate mean of values in bins

Problem description: I have a list of $\{x,y\}$ pairs. I'd like to divide $x$ into equal[*] bins, say $bx_1, bx_2, \ldots$, calculate $\left<y\right>$ for every bin and then plot the bin values ...
5
votes
3answers
451 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 ...
5
votes
1answer
181 views

Why doesn't FrameTicks work with Histogram?

An example: Histogram[RandomVariate[NormalDistribution[], 1000], PlotRangePadding -> 0, Frame -> True, FrameTicks -> {{{0, 0}}, {}}] I expected this ...
5
votes
2answers
246 views

Histogram3D using sums instead of counts

I'm trying to create a 3d histogram/ matrix plot pair. My data is in the form {{TTR1,TBF1},{TTR2,TBF2},....} What I would like is to modify the Histogram3D so ...
5
votes
3answers
310 views

How to preserve clipping when exporting a framed histogram with font embedding?

I work with histograms and would like to export it to EPS format. I've noticed that my exported image loses the PlotRangeClipping option that I set up when I export the plot. This is true for at least ...
5
votes
1answer
207 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 ...
5
votes
1answer
350 views

How to scale Histogram counts with the value of bin center?

I am analyzing some variates from a steeply falling power-law distribution (approximately with a power index -4) using Histogram[data, Automatic, "PDF"] While ...
5
votes
1answer
326 views

Efficiently generating histograms with large numbers of bins

I'm trying to generate a histogram for a large data set with the following lines of code: ...
5
votes
1answer
521 views

Problem displaying eps exported histograms in Word 2010

I am having problems displaying histograms exported as .eps in Word 2010. I don't have problems though displaying them in a specialized .eps viewer. (Postsript viewer from Rampant logic) I am writing ...
4
votes
2answers
477 views

Add two Histograms to calculate summed Mean and StandardDeviation

As a follow up to this question: Calculate mean and standard deviation from ImageHistogram I would like to add two histograms before calculating the mean and StDev. I would like to sum the numbers, ...
4
votes
2answers
2k views

Calculate mean and standard deviation from ImageHistogram

I am doing my PhD in Clinical Neuropsychology; I had someone helping me analyse images (.jpg pictures) in Mathematica, but it turns out this person made some really bad decisions, and well, now I have ...
4
votes
2answers
992 views

Is there a way to output histogram x and y data without using the Histogram chart function?

I have a large list of data (3.2 million real numbers), and I would like to plot a histogram of it. The built-in Histogram function is very nice, but on my ...
4
votes
2answers
409 views

density/histogram plot for date-time data

I have date and time data and want to plot its frequency histogram. Ideally I want to be able to customize the bin size (for example, every 5 minutes or a day). Anybody has this experience?
4
votes
1answer
1k 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 ...
4
votes
1answer
317 views

How can I have an axis label automatically positioned below the X-axis?

I'm attempting to generate some histograms, and I'd like to automatically label the X-axis. However, Histogram[. . ., AxesLabel -> {"X", "Y"}] places the "X" ...
4
votes
1answer
183 views

Rescuing a vertically clipped histogram

I recently ran a rather time intensive calculation and plotted the results in a histogram by simply called Histogram[data]. However, because of a rather serious error on my part, I recently lost my ...
3
votes
3answers
375 views

Log-log scale smooth histogram

How can I create a smooth histogram with a log-log scale? I can use Histogram[data, "Log", "LogCount"] to get a log-log histogram, or I can use ...
3
votes
3answers
578 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 ...
3
votes
2answers
196 views

Multiple histograms grouped in a chart

I have this problem: I have three distributions and the relative histograms. But I would like to create an histogram in which the three columns of each single histogram for the same bin are put ...
3
votes
1answer
607 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. ...
3
votes
1answer
231 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 ...
3
votes
1answer
147 views

DensityHistogram label/display values in Mathematica 8

I'm trying to make a DensityHistogram in Mathematica 8 that overlays the histogram values for each location. What I want is for the value of each square to be ...
3
votes
1answer
179 views

Making multiple sideways histograms/bell curves around temporal data

I don't quite remember what this type of plot is called, but here is the idea: I have some data which is indexed by time, and I want to look at the evolution of the distribution of that data as time ...
3
votes
2answers
225 views

two histograms ratio

I have two histograms and using listplot to draw both. Now, I want to draw a second plot, below the first, with the ratio of each bin. Does anyone know how to do this? Many thanks. This is the code ...
3
votes
1answer
135 views

Using bin values and metadata in ChartElementFunction in histograms

The DensityHistogram command lets you specify a ChartElementFunction which according to the documentation: The arguments ...
3
votes
0answers
89 views

AbsoluteOptions of a Histogram with PlotRange [duplicate]

Possible Duplicate: Mathematica: Retrieving PlotRange from Histogram I would like to evaluate the AbsoluteOptions of one of my ...
2
votes
1answer
218 views

How do I create a histogram out of this datastructure: x[i] = value_i?

Here is my SSCCE: a[1] = 2; a[2] = 3; a[3] = 6; Histogram[a] This throws and error though. Here are my questions: What kind of data type is a? Is it an ...
2
votes
1answer
175 views

Making a histogram of a user defined random variable

Suppose I want to generate a histogram of $n$ trials a slightly complicated random variable in Mathematica. Is there an easy way to do this? For instance, to make a histogram of a normal variable one ...
2
votes
2answers
138 views

Extracting counts of contiguous zeros and ones from a binary array

I'm a novice with Mathematica, but you guys have been very helpful to me in the past. I have a binary array [100, J repetitions] consisting of zeroes and ones. I'd like to extract a histogram of the ...
2
votes
2answers
274 views

How do I generate a 3d histogram of runs

This question is an extension of the question I asked here Histogram of runs. What I would like to do now is generate a Histogram3D that has the run duration on the x axis and the mean level on the ...
2
votes
1answer
120 views

Discontinue, then continue x-axis of 2D Histogram

I have the pictured Histogram. It was generated by the following lines: ...