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.

Filter by
Sorted by
Tagged with
5
votes
2answers
206 views

Fit function to histogram

I have a list: histx={-56.6335, -57.2327, -57.8607, -57.9682, -57.0061, -57.1872,-56.9209, -56.1284,...}; I managed to create the histogram that I wanted to: But ...
0
votes
1answer
61 views

How to get the Histogram based on the intensity cross section of each spot?

I am supposed to plot the histogram based on the intensity cross-section of each circular area, I have done counting manually each area based on the pixel intensity cross-section of each green and red ...
4
votes
2answers
148 views

HistogramList with logarithmic bins?

HistogramList gives the possibility to bin the elements in a list. Is it possible to have a logarithmic spacing? In an histogram I would do something like: ...
5
votes
1answer
227 views

Histogram as scatter plot

I want to draw a histogram as scatter plot, i.e. bin center vs. count. I found only a cumbersome way (steps 1-4) to achieve this standard procedure. Is there a more efficient way to draw a bin-...
2
votes
2answers
77 views

How to extract bar heights from histogram

In mathematica I have plotted a histogram with the PDF option from a list of values. How can I extract the heights of the bars in the histogram so that I can compare them with those of another ...
3
votes
2answers
154 views

Is there a way to generate a data-driven Monte Carlo sample from a histogram?

I have a vector with 50 elements. These are values of a random variable. I have represented the data as Histogram[RandomVariable1Histogram]. However, I need to ...
8
votes
0answers
94 views

Why is WeightedData slow?

I have been using WeightedData with Histogram, HistogramList, ...
5
votes
1answer
135 views

Discrepancy between Histogram and SmoothHistogram

...
5
votes
1answer
116 views

What is the default binning method of Histogram[]?

Histogram[] command returns a histogram of a set of data. There are different methods of binning, such as, Scott's rule, which we can specify the binning method in Mathematica. My question is what is ...
1
vote
2answers
173 views

FindDistribution doesn't return a decent result

I have the following data set: ...
2
votes
1answer
88 views

Histogram and Around

If I have histogram as ...
3
votes
1answer
57 views

How can I label a table of histograms with the names of the data symbols, not the data themselves?

How can I label a table of histograms with the names of the data symbols, not the data themselves? If I want to make a table of plots with each plot labeled with the name of the function it plots, ...
1
vote
1answer
71 views

Sample discrete distributions with a good range of observed entropies

For a numerical sanity check, I need to sample random sequences of $n$ positive numbers adding up to 1, and having a high chance of observing both high entropy and low entropy sequences. Compute the ...
4
votes
1answer
99 views

adding text above bins of histogram

I have the following histogram: ...
1
vote
1answer
38 views

Cannot combine graphic objects while plotting two Smooth Histograms

I am trying to plot two smooth histograms, which I'm generating separately so I can chose their PlotStyle separately. When I run the code, it says I cannot combine the two graphic objects. What am I ...
2
votes
0answers
36 views

Changing the color and thickness of smooth histograms of two sets curves on the same graph

I have a code (shown below) where I generate two different sets of data and plot the two sets as a smooth histogram on the same graph. The code works pretty well. What I'm having an issue with is ...
5
votes
0answers
305 views

Histogram (automatic binning)

There are different methods for choosing widths of bins for a histogram, like Freedman-Diaconis rule. In Mathematica, without choosing a specific method, with the command ...
1
vote
1answer
43 views

How can I set the leftmost x-value of a Histogram?

The following code: ...
1
vote
2answers
81 views

plotting a Histogram with a list of x and y values

I have a list of values : ...
0
votes
1answer
50 views

Making histogram from a vector

I am looking for a nice way to turn a vector-valued function into a set of histograms. I have a function $$f(t) = (a(t), b(t), c(t), d(t))$$ and would like to plot a histogram of the values of $\vert ...
1
vote
1answer
53 views

color distinguish two smooth histograms

I want to color distinguish my two smooth histograms, I am not able to do so. I am writing the following but it is not working, Can you aid? ...
1
vote
1answer
43 views

Values corresponding to SmoothDensityHistogram

I am looking for extracting the values associated with SmoothDensityHistogram. For example in ...
2
votes
1answer
187 views

Entropy of a distribution

I need to calculate the entropy of a distribution from raw data. I found two approaches here and here. But it seems they don't work for my case. My data is: ...
1
vote
1answer
78 views
5
votes
1answer
57 views

Fixing histogram size behavior within grid of graphics

I'm trying to put the finishing touches on a grid of figures and could use some help. I'm trying to keep the figures as clean as possible, so I only want frame ticks and labels on the edge figures. ...
4
votes
2answers
66 views

Changing colour of ImageHistogram

Is there a way I can show the three ImageHistogram[]'s in different colours? ...
5
votes
1answer
136 views

Problem with DateHistogram Epilog

Bug introduced in 11.3 or earlier and persisting through 13.0 @Szabolcs reported this bug on the WRI Redmine bug tracker 11 months ago. It is still "In Progress". ...
0
votes
1answer
55 views

How to plot Log(P(x)) in a histogram?

I have been using SmoothHistogram to plot the probability density function $P(x)$ of some experimental data. On the y-axis, I would like to have $\log(P(x))$ ...
2
votes
2answers
47 views

Date ticks with SmoothHistogram3D

I would like to plot some data with SmoothHistogram3D, but one of the axis is date, and I would like the ticks to reflect that: ...
1
vote
1answer
71 views

How to plot Loglinear histogram in mathematica for x and y data

I have an x and y data, x is in log scale and y is in ...
4
votes
1answer
87 views

DateHistogram with Stacked / Percentile layout

Requirements Each bin's bars stack to 1. Nice Date axes labels and maximal support for DateHistogram features/options. Example ...
4
votes
1answer
187 views

Plotting a hexagonal histogram

For positive integers $D$, I have a function s[D_] which creates a list of complex numbers, all of the form $a+b\sqrt{-D}$, where $a$ and $b$ are integers. These ...
1
vote
0answers
48 views

Find custom distribution parameters that best fit the PDF/CDF data histograms [duplicate]

I have the probability and cummulative density histograms of some data. I need to find the parameters of a custom distribution that best fit the data. For probability distributions included in ...
1
vote
1answer
175 views

Normalize a histogram and make the scale log linear simultaneously,

I have data in list b3, First step is normalizing the histogram using the following command, Histogram[b3, 100, "ProbabilityDensity"] Second I would like to make the y scale log, I use ...
4
votes
2answers
97 views

DateListPlot to DateListHistogram

I would appreciate help in easily converting a DateListPlot command into a DateListHistogram command. In principle, given the List, whether a plot where each point is represented by a point as versus ...
1
vote
2answers
105 views
4
votes
2answers
94 views

How to draw bin edges?

I would like to show the edges on the following produced histogram: This works as expected in terms of edges: ...
2
votes
2answers
50 views

Strange Show Behavior

When attempting to overlay a Discrete Plot on a Histogram, no matter the order I pass each argument in Show, the Histogram stacks over the Discrete Plot. Is it possible to lay the DiscretePlot over ...
2
votes
1answer
45 views

Why are these two histograms plotting so differently?

I have two lists, which are pretty similar. They are given by: ...
0
votes
1answer
67 views

How to combine 2D SmoothDensityHistogram and 3D curve?

I am trying to combine 2D SmoothDensityHistogram and 3D curve. This is my histogram code ...
-3
votes
1answer
56 views

Histogram graph shows 3 elements on top of another, not one after another

So my problem is basically what the title says. Instead of what it should look like this is what it looks like resulting graph. Should it be like that? Or is it an error?
4
votes
2answers
122 views

Plotting a Set of Three Points with Histogram3D

I would like to know whether I can use Histogram3D to plot a set of points with three given values. I want to plot the values {0, 0, 0.01}, {0, 1, 0.1}, {1, 0, 0.02}...
2
votes
2answers
297 views

3D Histogram from discrete data

I have some (discrete) data of the type $\{x_i,y_i,z_i\}$ ...
2
votes
3answers
63 views

Contribution of 3 groups of data to an overall PDF

I have a time series that is comprised of 3 subgroups. I want to know how I can calculate the contribution of each of these subgroups to the overall PDF. ...
1
vote
0answers
48 views

Histogram Memory Allocation Failure [closed]

I have a list of 3256 pairs of data with which I plotted a scatter plot, no problem. But when I tried to take the ratio with the two elements of each pair and do a Histogram of the ratios, I got a ...
1
vote
2answers
186 views

How to plot a continuous standard normal PDF over a normalized histogram of real discrete data [closed]

Below in code are two versions. I believe plot1 might be correct but not sure why its shifted to the left and how to fix it. plot2 is copied directly from the wolfman online documentation but using my ...
3
votes
2answers
256 views

Combining a point plot with a histogram

Hi everyone and sorry for my english, I'm new to Mathematica. I have a problem combining points with histograms in Mathematica 12.0. I would like to display a frequency histogram along with points ...
0
votes
1answer
62 views

Apparent discrepancy between visual and calculated Mean in Histogram

From a randonly generated normal distribution of values v: v = RandonVariate[NormalDisrtibution[56.6*10^-9,2.5*10-9]] I ...
0
votes
1answer
153 views

Extracting the data from DensityHistogram

I have a plot of a DensityHistogram from a dataset collected in the lab (stored as {{x1,y1},{x2,y2},...}). The data used to ...
1
vote
1answer
100 views

Plotting Photon Number Distribution of squeezed states in Mathematica

I want to plot photon number distribution (PND) of even and odd photons in a single-mode squeezed vacuum state in Mathematica but I don't know how to plot. The formula of PND is $P_{2 n}=\frac{(\...

1
2 3 4 5
8