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
2 votes
2 answers
55 views

Histogram and probability curve for a range of values

I don't know if I will be clear about what I am asking for, but here is my problem: how could I create a histogram (with the probability curve, later) when I have many different values (each one with ...
user avatar
  • 723
7 votes
1 answer
420 views

Tuples optimization challenge

Consider a function that for a given integer $0\le n <256$ computes the number of leading zeros in its binary representation. ...
user avatar
  • 16k
4 votes
2 answers
98 views

DateHistogram with DateReduction -> editing x axis

I have a list of dates spanning over multiple years (i.e.): ...
user avatar
1 vote
1 answer
78 views

How to set a max value in SmoothDensityHistogram?

I'm using SmoothDensityPlot to compare two data sets DATA1 and DATA2, in which, each one has its respective maximum value, so I would like to set a BarLegend (already discussed here) corresponding to ...
user avatar
2 votes
3 answers
113 views

Custom normalization of Histogram

Let us consider the following lists SeedRandom[1] list1 = RandomReal[{-10, 10}, 1000]; list2 = RandomReal[{-10, 10}, 200]; Histogram[{list1, list2}, 100] The ...
user avatar
  • 1,578
0 votes
0 answers
15 views

How to add Barlegend in DensityHistogram as z axis?

I have data in the form of x={1,3,5,6,2,4,6,4.5,2.5,2.1,5.7}; y={3,6,2,1,8,4,3,9,11,16,9}; z={0.000001,0.0004,0.000012,0.000005,0.000002,0.000003,0.0010008,0.000009,0.000007,0.005,0.000009}; Data={1, ...
user avatar
5 votes
2 answers
246 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 ...
user avatar
1 vote
1 answer
91 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 ...
user avatar
  • 33
4 votes
2 answers
179 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: ...
user avatar
  • 6,124
6 votes
1 answer
274 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-...
user avatar
2 votes
2 answers
85 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 ...
user avatar
3 votes
2 answers
157 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 ...
user avatar
8 votes
0 answers
100 views

Why is WeightedData slow?

I have been using WeightedData with Histogram, HistogramList, ...
user avatar
  • 245
5 votes
1 answer
138 views

Discrepancy between Histogram and SmoothHistogram

...
user avatar
  • 23.2k
5 votes
1 answer
136 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 ...
user avatar
  • 65
1 vote
2 answers
180 views

FindDistribution doesn't return a decent result

I have the following data set: ...
user avatar
2 votes
1 answer
90 views

Histogram and Around

If I have histogram as ...
user avatar
3 votes
1 answer
80 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, ...
user avatar
1 vote
1 answer
74 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 ...
user avatar
4 votes
1 answer
105 views

adding text above bins of histogram

I have the following histogram: ...
user avatar
1 vote
1 answer
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 ...
user avatar
2 votes
0 answers
39 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 ...
user avatar
5 votes
0 answers
329 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 ...
user avatar
1 vote
1 answer
53 views

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

The following code: ...
user avatar
  • 21
1 vote
2 answers
90 views

plotting a Histogram with a list of x and y values

I have a list of values : ...
user avatar
0 votes
1 answer
59 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 ...
user avatar
  • 137
1 vote
1 answer
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? ...
user avatar
1 vote
1 answer
49 views

Values corresponding to SmoothDensityHistogram

I am looking for extracting the values associated with SmoothDensityHistogram. For example in ...
user avatar
2 votes
1 answer
234 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: ...
user avatar
1 vote
1 answer
93 views

Calculation of an integral which involves distribution of data

I have some data as: ...
user avatar
5 votes
1 answer
58 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. ...
user avatar
4 votes
2 answers
66 views

Changing colour of ImageHistogram

Is there a way I can show the three ImageHistogram[]'s in different colours? ...
user avatar
  • 974
5 votes
1 answer
139 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". ...
user avatar
0 votes
1 answer
87 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))$ ...
user avatar
  • 115
2 votes
2 answers
51 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: ...
user avatar
  • 13.8k
1 vote
1 answer
77 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 ...
user avatar
  • 1,649
5 votes
1 answer
91 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 ...
user avatar
  • 132k
4 votes
1 answer
216 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 ...
user avatar
1 vote
0 answers
49 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 ...
user avatar
1 vote
1 answer
226 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 ...
user avatar
4 votes
2 answers
98 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 ...
user avatar
  • 457
1 vote
2 answers
111 views

How to set specific bin and width for each dataset within a Histogram3D

...
user avatar
  • 291
4 votes
2 answers
100 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: ...
user avatar
  • 291
2 votes
2 answers
51 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 ...
user avatar
  • 539
2 votes
1 answer
45 views

Why are these two histograms plotting so differently?

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

How to combine 2D SmoothDensityHistogram and 3D curve?

I am trying to combine 2D SmoothDensityHistogram and 3D curve. This is my histogram code ...
user avatar
  • 1
-3 votes
1 answer
57 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?
user avatar
4 votes
2 answers
127 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}...
user avatar
  • 261
2 votes
2 answers
416 views

3D Histogram from discrete data

I have some (discrete) data of the type $\{x_i,y_i,z_i\}$ ...
user avatar
2 votes
3 answers
66 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. ...
user avatar

1
2 3 4 5
8