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
18 views

Plotting Evolution of probability with time

I have compiled data about the evolution of a function with time and the data looks something like this. I wanted to plot this data in the form of a density histogram such that every row represents ...
0
votes
0answers
26 views

How to obtain an histogram with xlsx data? [duplicate]

i'm new on mathematica and i have some issue. I need to plot an histogram with data from excel, my data are: ...
2
votes
1answer
39 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 ...
1
vote
0answers
36 views

Getting a PDF from a NonlinearFitModel

With the help of @JimB, I could fit some experimental data with a CDF using NonLinearFitModel. The set of data is the following: ...
7
votes
3answers
71 views

DateHistogram FrameLabel overlaps FrameTicks

Bug introduced in 11.3 or earlier and persisting through 12.0.0 ...
2
votes
1answer
52 views
1
vote
1answer
96 views

How can I make a frequency plot of successful trials? [closed]

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
40 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
204 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
26 views

Make DateTicks appear for every day and rotated in DateHistogram

Given the following code for plotting DateHistogram: ...
2
votes
3answers
137 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
85 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
70 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
106 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
80 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
66 views

PDF Export of logarithmic histogram contains no axes labeling

I have the following data: ...
2
votes
3answers
121 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? ...
2
votes
1answer
121 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
216 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
51 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
98 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
58 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
50 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
82 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
182 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
90 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
106 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
109 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
82 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
49 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
37 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
187 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
101 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
82 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
68 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
277 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
118 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
44 views

Bin arbitrary data using canonical ordering

I have two lists of words, nouns and verbs: ...
1
vote
2answers
94 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
125 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
100 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
425 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
77 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: ...
3
votes
1answer
231 views

How to compare histograms of two Images?

Is there any function in Mathematica that I can use for comparing the image histogram ? There is a built-in function in OpenCV cv2.compareHist for distance measures ...
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
120 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
73 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: ...