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

5
votes
1answer
390 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
212 views

Why doesn't FrameTicks work with Histogram?

An example: Histogram[RandomVariate[NormalDistribution[], 1000], PlotRangePadding -> 0, Frame -> True, FrameTicks -> {{{0, 0}}, {}}] I expected this ...
3
votes
2answers
249 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
811 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. ...
2
votes
2answers
146 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 ...
1
vote
0answers
99 views

Speeding up 2D histogram plotting (perhaps via ListDensityPlot)?

What would be the fastest way to take an array containing about $n=10^6$ to $10^7$ elements and plot a two-dimensional histogram with A x B bins? ListDensityPlot is taking upwards of half-an-hour. ...
1
vote
1answer
196 views

Bincounting a list

I'm a Mathematica novice here. I'm trying to execute the following code to add random 1's into a zero matrix, repeat this many times, and then bin/histogram the number of nearest neighbor 1s. Can ...
1
vote
2answers
447 views

Make a histogram by giving the range and height of each bin one by one

I got the data of each bin by measurements like {start, end, height} and I want something like this picture: http://tinypic.com/view.php?pic=2i208hs&s=5 I ...
0
votes
1answer
295 views

Combining Histogram and SmoothHistogram

How can we draw Histogram and SmoothHistogram together for two data sets?. I'd like to show the first data set using ...
0
votes
1answer
714 views

Plot and Histogram together in Mathematica 7

I want to draw a histogram and some line plots together. I have one observed variable and several predicted ones. Observed data should be shown as a histogram and the predicted variables should be ...
1
vote
1answer
440 views

Weird vertical line when trying to plot a histogram [duplicate]

I'm trying to plot a histogram of a few data points and overlay a plot on it (it's a fit of a geometric distribution to my data). The weird thing is that a vertical line appears always next to the ...
1
vote
0answers
88 views

Distribution above pointplot [duplicate]

This is my first question here, so I'm sorry if I do something wrong. Also I'm fairly new to Mathematica (using 8). I've used it about 2 months. Only 2 weeks intensive. The rest was about ...
15
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, ...
1
vote
2answers
468 views

Probability density histogram with unequal bin widths

I am confused by output of Histogram and HistogramList for probability density ("PDF") when ...
0
votes
1answer
127 views

How to obtain an approximate function for SmoothHistogram3D?

I have a random distribution of points in the $x\!-\!y$ plane. I can obtain a graphical representation of the probability distribution function using ...
4
votes
1answer
2k 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 ...
2
votes
1answer
145 views

How to extract the bin width from a Histogram made with an automatic binning method?

I am using the Scott binning method with Histogram and Histogram3D to plot some data. How could I find out the bin width chosen ...
6
votes
3answers
478 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. ...
5
votes
2answers
632 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 ...
5
votes
2answers
277 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 ...
8
votes
3answers
563 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: ...
2
votes
1answer
536 views
2
votes
2answers
263 views

Misaligned DensityHistogram, DistributionAxes & PlotRange

data = RandomReal[NormalDistribution[0.5, 0.1], {10000, 2}]; DensityHistogram[data, PlotRange -> 1, Method -> {"DistributionAxes" -> "Histogram"}] The ...
4
votes
1answer
371 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
190 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 ...
0
votes
2answers
401 views

Creating histogram?

How can i create histogram of these variables that would show the depth of sensors when temperature is 0 Degree Celsius. Time function is 0 min, 50 min, 100 min, 150 min, 200 min, and 250 min and ...
1
vote
0answers
298 views

Problems with log-log histograms

I'm using a custom function to create Log-Log Histograms of my data. It uses the CustomTicks` package (in LevelScheme, http://scidraw.nd.edu/levelscheme/) to display Log Ticks. ...
6
votes
1answer
247 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: ...
3
votes
3answers
631 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 ...
2
votes
2answers
293 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
236 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 ...
14
votes
2answers
756 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 ...
3
votes
1answer
147 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 ...
4
votes
2answers
549 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 ...
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.
8
votes
2answers
899 views

ColorFunction in Histogram[]

Let's say I have a Histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] and I want the bars positioned to ...
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. ...
14
votes
3answers
915 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 ...
11
votes
2answers
885 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 ...
5
votes
3answers
347 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 ...
3
votes
0answers
92 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 ...
4
votes
2answers
1k 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 ...
15
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 ...
8
votes
2answers
840 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, ...
11
votes
4answers
290 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 ...
5
votes
3answers
500 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 ...
7
votes
1answer
600 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: ...