Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
61 views

How can I make a frequency plot of successful trials?

I have got different files with the result of an experiment varying 2 variables. The files are in this link. Each file has 3 columns of data: the first column is the same for all the rows of the file ...
1
vote
1answer
30 views

How to organize the 2D data into binned distribution?

Consider a data data = {{x1,y1},{x2,y2},...} with n rows. I want it to be organized into $n$ bins for $x$ and $m$ bins for y, with the positions $x_{i}, x_{i+1}$...
10
votes
1answer
200 views

Constructing a ternary histogram

so this is currently what I'm building ...
1
vote
0answers
62 views

GeoHistogram with Graphics [closed]

The GeoHistogram function appears to use different coordinates to graphics, so that when you overlay they do not have the same origin. For instance, if I use ...
1
vote
1answer
25 views

Make DateTicks appear for every day and rotated in DateHistogram

Given the following code for plotting DateHistogram: ...
2
votes
3answers
134 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/...
3
votes
2answers
76 views

Putting a vertical line in each Histogram using GraphicsGrid

I'm using GraphicsGrid to show several histograms. In each histogram, I would like to show 2 vertical lines on the 2.5 and 97.5 percentiles. If I had an isolated histogram I would use Line, and Show....
2
votes
2answers
54 views

Distance between axes and tick labels

A similar question has been axed before in the context of a Framed plot: see here. My plot is unframed so I wasn't able to apply the answer to the other question. I create a histogram with the code ...
4
votes
2answers
97 views

Smooth Density Histogram bounded on non-rectangular domain

I'm trying to plot the Smooth Density Histogram of a double pendulum (particularly the location of the bottom pendulum). Since a pendulum has physical constraints, when shown in the Smooth Density ...
2
votes
1answer
78 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 . . . ...
4
votes
1answer
63 views

PDF Export of logarithmic histogram contains no axes labeling

I have the following data: ...
2
votes
3answers
112 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? ...
0
votes
0answers
67 views

Histogram based on pre-binned data (center of a bin given)

I have the following problem. I have a pre-binned list that I want to plot. Here is a shortened example: ...
3
votes
2answers
194 views

Using image data to create a 3D Histogram

I have a black and white .tiff file of a beam spot: I am trying to characterize the source in a Monte Carlo program, to do this I want to convert the image into a 3D Histogram with controllable bin ...
0
votes
1answer
49 views

Representing share on histogram axes respect to total data points - also ones not in range (fraction of values respect to ALL points) [closed]

I want to tick the Y axes so that the heights of the displayed bins in range, represent the share respect to total available points. I have a distribution of percentages on N data points (see below ...
1
vote
1answer
94 views

Finding the optimal probabilty distribution

I am trying to obtain the optimal probability distribution function to the following data. My attempt: ...
0
votes
2answers
53 views

Partitioning Mixture Distribution Dataset into constituent Distributions

Suppose I have a dataset that is derived from a random sampling from a mixture distribution ...
0
votes
1answer
45 views

How to export histogram legends correctly?

Found it really hard to export a high resolution .png while keeping the legends. Here is the code: ...
0
votes
2answers
65 views

Histogram list returning bin centers and count numbers rather than bin domain points

Is there a native Mathematica function, similar to HistogramList[...] which will return a list of bin centres and associated counts, rather than the bin domains. I ...
3
votes
2answers
174 views

Organize the data to set of bins of equal height

Consider the data in the form data = {{1,10},{1,12},...{}}. How to organize this data in the set ...
2
votes
1answer
56 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 ...
3
votes
1answer
102 views

Remove transparency in Histogram

I have the following code, which places the data s1, s2, and s3 on a histogram as shown below. I would like the transparency set ...
5
votes
1answer
103 views

No values shown in histogram with “mouse-over”

Today I experienced a strange behavior in a histogram I made. Here a MWE: Given a set of points: pts = RandomReal[1, {1000, 2}]; and a helper function which ...
2
votes
1answer
76 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 <...
3
votes
3answers
46 views

Double differential distribution using set of data

Consider a set of data having the form $\{\{x_{1}, y_{1}\}, …,\{x_{n},y_{n}\}\}$. Each point from the set corresponds to 1 event with coordinate $x, y$. I'm looking for a procedure in Mathematica that ...
0
votes
0answers
33 views

How to make value on horizontal axis to be equal

How do I make the spacing for the x-axis plot to be equal from point 0 to the next point where it begins to have a data on the histogram? ...
4
votes
3answers
156 views

Construct Distribution Histogram From Random Variable

Given a Beta Random Variable $X$ with parameters $\alpha, \beta$ and a positive constant $n$, suppose I am interested in the distribution of: $$Y:=\lfloor nX\rfloor$$ Suppose I want a histogram ...
1
vote
2answers
91 views

Making a histogram with bin spacing and exporting the data

I want to create a histogram which has spacing between its bins (as shown below): to create this I used the following method: ...
1
vote
1answer
81 views

Build a histogram from stochastic data

I have the following code yielding my stochastic "paths": ...
8
votes
2answers
1k 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 ...
1
vote
1answer
61 views

Getting PDF from imported Histogram

So I'd like to create a probability density function from an existing histogram from a program that I use. My input data is of the form ...
3
votes
3answers
266 views

Stacked Histograms for two (or more) datasets, each with its own height specification

For simplicity, lets say I have two histograms ...
1
vote
2answers
100 views

Plotting histograms with bin count multiplied by some factor

Consider, for example Histogram[RandomVariate[NormalDistribution[0, 0.6], 1000]] which gives me, Now, is there a way to change the bin counts, as in, I want to ...
3
votes
2answers
42 views

Bin arbitrary data using canonical ordering

I have two lists of words, nouns and verbs: ...
1
vote
2answers
75 views

How to calculate the area under value x=[2, 4] for SmoothHistogram (PDF)

I have a discrete signal. How can I calculate the area under the curve for $2\le x \le 4$? How can I fill the same area in the plot generated by SmoothHistogram? ...
0
votes
1answer
111 views

Histograms and probability distributions

Consider $50$ random variables with probability distribution: $X∼Bin(20,.1)$, where $n=20$ and $p=.1$. Now take a random sample of size $i; \ i=1,5,12,30,40$ from the 50 random variables and plot ...
0
votes
1answer
49 views

Why is the distribution from SmoothHistogram3D NOT normalized? [closed]

I am plotting a intensity distribution by SmoothHistogram3D. It is a actually a heatmap from list of coordinates,{xcart,ycart}. The plotting looks great, except the z value is not within the range of ...
2
votes
1answer
82 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 ...
0
votes
1answer
380 views

Histogram of two data sets [closed]

I want to plot a histogram of two data sets in the following way: I've written this code, and following are my results: Can you help me out? What should I do?
3
votes
1answer
75 views

SystemException[“MemoryAllocationFailure”] bug in Histogram/Bincounts

I'd like to share a pernicious problem with BinCounts and therefore also Histogram. The minimized problem is as follows: ...
1
vote
2answers
107 views

Histogram with divided bars

I have file with the flux as a function of time given as Modified Julian Day (MJD). Now I need to make a histogram of the all fluxes. I also need put into each bar information about times when given ...
2
votes
1answer
102 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 ...
0
votes
0answers
65 views

Mixture distribution fitting containing a uniform distribution

I have a dataset that is clearly the mixture of 3 known distributions which can be generated as follows: ...
1
vote
1answer
105 views

Manipulate, TabView, and Histograms. Can they all be combined? [closed]

I previously received assistance here in constructing a Manipulate image that allows me to overlay plots of different data sets and toggle them on and off as needed,...
1
vote
3answers
87 views

Histogram/BarChart data replacement conundrum

I am trying to make a histogram or bar chart for multiple large data sets, with 52 bins where I need to do the following operations: A) Tally the counts per bin (which I have done reasonably easily ...
3
votes
1answer
93 views

DensityHistogram's density as function of other variables

DensityHistogram has a function hf, which I believe allows you to alter what defines the colours (I presume hf stands for height ...
2
votes
2answers
119 views

Creating a custom histogram

Let's create some sample data ...
1
vote
0answers
59 views

Can I make the z-axis on the SmoothHistogram3D output show quantity rather than probability?

In SmoothHistogram3D, the x- and y-axes are in the form of the original input; 0 maps to 0 and 1 maps to 1, etc. However, the z-axis returns a probability rather ...
0
votes
1answer
83 views

Replace values in 2D arrays with bin numbers (down sample)

I have a 2D array with a lot of large values in it. This is the histogram for the data with the values grouped into 16 different bins: I want to replace all the values in the array with their bin ...
1
vote
2answers
458 views

Calculate area under histogram bins [closed]

Histogram[RandomVariate[NormalDistribution[0, 1], 200]] How to calculate the area under the histogram.