# 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
507 views

### How to create a custom histogram (normalized)

Let's create some sample data ...
113 views

### histogram of RandomInteger is wrong at boundary

The problem is easy to reproduce. Try Histogram[RandomInteger[{-205, 205}, 10000]] I got What is wrong with the boundary bar? They supposed to be the same ...
851 views

### How can I get Histogram to show the number of elements in its bins?

I'm just using Histogram[data, 50]. All the examples on the Histogram help page show show the number of elements when the cursor ...
215 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 ...
376 views

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

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

### Creating a histogram using custom data

Let's consider the following simple data set ...
327 views

### Finding where maximum of histogram occurs

If I have made a histogram of some data. How can I find out at which x-bin position the maximum occurs? ...
308 views

### Histogram distribution

Imagine the following data: data = {-0.7, -0.5, -0.2, 0.1, 0.4, 0.5, 0.9, 1.1, 1.2, 1.3, 1.5, 2.1} From that I make a ...
439 views

### Easy way to create an histogram with given heights? [closed]

What is the easiest way to create an histogram with the heights of each bin already determined? I read all the support page on histograms but I don't understand if there is a way to create an ...
190 views

### Get histogram of number of vertices per component of graph H

I have a huge graph with ~8k vertices and ~1k components. I want a histogram showing the number of vertices for each component. How do I do this? EDIT: I'm trying ubpdqn's approach, but not gettting ...
794 views

### How to interpret an image histogram and plot histogram3D for an image?

I'm really finding many ambiguities in how I really should interpret the histogram of an RGB image? I could understand what the height denotes, but did not understand how the pixels get plotted on a ...
616 views

### Dual Axis Histogram

I'd like to plot two histograms on top of one another, but they have very different scales. Is it possible to plot a histogram with two y-axes, similar to the custom function found here for plots?
460 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 ...
2k 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: I have no other data for the ...
400 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 ...
49 views

### BarChart: First Bin centered at 0 instead of 1

I want to plot an overlapped graphic comparing the experimental and theoretical data of the number of counts in a given time (beta decay), so I show them in a histogram. Because of sometimes the ...
201 views

### Custom 3d histogram

so I wondered if there is a way to use histogram list such that it doesn't bin in quadrat mode, but given a set of 3D points, could bin over a tessellation of some regular tetrahedrons/hexagons/...
334 views

### Is it possible to have histogram in LogLog scale?

Histogram[data,"Log"] will generate an histogram with a log scale on the x axis, but I need a ...
218 views

### How to transform a 3D list to a 2D list?

I want to apply the command Histogram3D to an image.The image data is {{r1,g1,b1},{r2,g2,b2}...} And the input of ...
2k 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 ...
370 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 ...
2k views

...
83 views

### Usage and meaning of “ProbabilityHistogram”

When doing a classification one can determine the ClassifierMeasurements to get Information about the classifier. I now wanted to get a histogram of the computed probabilities for a classifier. Maybe ...
69 views

### Confusion about Predict Model NameAge

Predict["NameAge", "Claire"] 8 distribution = Predict["NameAge", "Claire", "Distribution"] dataRaw = distribution[] <...
108 views

### Histogram range of bins

Mathematica misrepresents data with Histogram by choosing "arbitrary" range in its bins. For example the command: Histogram[Table[RandomReal[], {100000}]] Gives ...
113 views

### Histogram with “PDF” option with strange values on y-axis - Interpretation? [duplicate]

Here's a working example of what I see: ...
207 views

### Normalizing smoothhistogram curves

I'm looking for a way to get two smooth histogram curves to have the same max height. The plots are usually scaled by area or something, however, the only way I've been able to find that works is a ...
214 views

### SmoothHistogram binning and “Intensity”

I'm having trouble with the way SmoothHistogram handles bins. At the end of the day, I want to express the vertical axis ticks in terms of the normalized values of the bin counts. This can easily be ...
365 views

### How can I use Histogram and Histogram3D on an image?

I have a .jpg image named r. I am using the following code to plot a histogram: ...
269 views

### Display vertical histogram alongside a list plot [duplicate]

Suppose I have some data ranging from -xRange to xRange: ...
200 views

### How to create a 3-d histogram from bivariate frequency data

I am using Mathematica 9, and have a data set ...
173 views

### Distribution of max of partial sums of normal distributions

I was surprised not to find this question already answered: if I take the maximum of the partial sums of n normal distributions, what is the resulting ...
182 views

### How to get the number of entries of histograms in the legend?

I plot three histograms (originating from a large Dataset ds) in one graph ...
195 views

### Custom SmoothHistogram3D

I decided to make my own SmoothHistogram3D function because I wanted to be able to specify my own bin sizes and not rely on their distribution functions so taking a cue from this answer and bringing ...
72 views

### Creating custom values for a histogram

Let's consider the following test case ...
295 views

### Histogram based on pre-binned data (center of a bin given) - bin size not equal

I have the following problem. I have a pre-binned list that I want to plot. Here is a shortened example: ...
94 views

### Fitting an equation to data set, am I doing this right?

I have a large data set of different values of time. I want to make 1) a histogram 2) fit an exponential function of form A+B*exp(-t/b) from the data To my understanding, this is how I'd do it <...
139 views

### Creating a custom histogram

Let's create some sample data ...
174 views

### Histogram does not compute

I have a strange problem I haven´t had so far. I have a list of 16 lists of Integers and Rationals and want to show the 16 Histograms. Problem: The Histogram for the second list is not shown, the ...
203 views

### Rescaling the counts for a DensityHistogram

I have the following problem: I need to rescale the counts given to DensityHistogram, meaning that I want to multiply the total counts per bin by a certain number (...
727 views

### ListPlot with log scale in x axis

This is the list with the points I will use ...
218 views

### Best way to include a “singularity” in a SmoothHistogram?

I have a dataset like this: data = {0,0,1.1,1.3,0,0,3.4,0,0,2.3,0,0 .....} You can imagine that data is generated from a ...
404 views

### How to make a cumulative time plot?

So I'm working with this data set where there is just one input(a date and time) per line in a .csv file. I've let Mathematica understand the input using "DateStringFormat". The time looks like Year-...
31 views

### Find the Kernel distribution over an already known histogram

I have an estimated distribution over a parameter, however, the distribution is not continuous, and InterpolatingPolynomial cannot estimate my distribution good ...
107 views

### Importing data multiple times from the same file

I have a large data file (.txt) with bivariate data in the following form x1,y1 x2,y2 x3,y3 . . . xn,yn ---------F 0 x1, y1 x2, y2 . . . xn, yn --------F 1 . . . ...
332 views

### Histograms of gray scale images

I have a large set of subsequent 8bit gray scale png images (50 Hz). They show the noise of a CMOS camera, with the lens covered. A subset of 50 images is available here: https://goo.gl/Sa3P9P I ...
238 views

### Histogram scale error when using DistributionChart

I'm a novice Mathematica user that is having some problems using the HistogramDensity function in a DistributionChart. My observations are heavily skewed to one category and the height of the other ...
56 views

### Plot of a histogram is exported with wrong ticks if log-transformed data are used

I've generated a histogram of my data, using their log values, and exported the resulting plot as pdf. To my surprise, the ticks in exported plot were replaced by the logarithm of the ticks in the ...