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.

416 questions
26
votes
6 answers

Removing a histogram's vertical edges

Let's say I have a histogram: Histogram[RandomVariate[NormalDistribution[10, 2], 500]] How can I remove vertical lines inside the histogram and keep only the edge?
Suro
  • 1,169
  • 1
  • 9
  • 17
5
votes
1 answer

Discrepancy between Histogram and SmoothHistogram

(* This generates the data that illustrates the issue *) pdf = MixtureDistribution[{0.54, 0.46}, {CauchyDistribution[0.47, 0.26], NormalDistribution[30.33, 12.04]}] mock = RandomVariate[pdf, 70000]; mock2 = Select[mock, 0 < # < 50 &]; When I draw…
corey979
  • 23,947
  • 7
  • 58
  • 101
5
votes
1 answer

Weighted smooth histogram

I have a large list $L$ ($|L| \sim 100000$) of pairs $\{x_i,w_i\} \in \mathbf{R} \times [0,1]$ subject to the constraint that $\qquad \sum w_i = 1.$ I would like to use $L$ to graph a smooth function which "approximates" the PDF $\qquad \sum w_i…
user67131
  • 53
  • 2
5
votes
2 answers

Thickness of bars in a histogram

How can I control the thickness of the bars (here vertical lines) in a Histogram plot? For example in the plot below (of the corresponding image: http://goo.gl/RyMpXE) I can hardly see histogram bars above 300 brightness. Code for producing the…
mrz
  • 11,686
  • 2
  • 25
  • 81
4
votes
1 answer

adding text above bins of histogram

I have the following histogram: ClearAll[texture] texture[ms_ : {Black, White}, m_ : 100] := Texture@RegionPlot[True, {x, 0, 1}, {y, 0, 1}, MeshFunctions -> {# - #2 &}, Mesh -> m, MeshStyle -> None, MeshShading -> ms, Frame -> False, Axes ->…
user80311
4
votes
2 answers

Add two Histograms to calculate summed Mean and StandardDeviation

As a follow up to this question: Calculate mean and standard deviation from ImageHistogram I would like to add two histograms before calculating the mean and StDev. I would like to sum the numbers, not superimpose the graphics. Explanation: I have…
onemonkey
  • 81
  • 1
  • 6
4
votes
2 answers

Histogram: Format issue

I have a format issue with my histogram. First of all my command: Labeled [Histogram[{data},{Width},"Probability",LabelingFunction->Above,ImageSize->{820,530},PlotRange->All],{Rotate["relative",90 Degree],nameAxisX},{Left,Bottom}] I have data in…
4
votes
6 answers

Histogram from relative frequency data;

I've got a data set similar to the first and fourth column of this table http://mathworld.wolfram.com/FrequencyDistribution.html where the first column is the midpoint of a fixed range of values (although a solution with arbitrarily spaced segments…
Andrew Stewart
  • 421
  • 2
  • 9
3
votes
2 answers

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 hovers over each bin. I've tried to use Tooltip but it just shows 50 (the number of bins) for every bin.
user5091
  • 191
  • 5
3
votes
1 answer

Binning of listplot

I have two arrays describing a 1-dimensional mass distribution. The first array, $x$, are the (un-sorted, and un-evenly distributed) x-coordinates; the second, $m$, the corresponding masses. I would like to bin the data, and obtain the total masses…
Hao Wang
  • 153
  • 1
  • 1
  • 5
3
votes
1 answer

Is there a way to make a histogram normalized not to unity but to a specific value of choice?

I am trying to create a histogram that is normalized to a value other than 1, so this wouldnt work for me: Histogram[list,"PDF"]
L. P.
  • 101
  • 5
3
votes
2 answers

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 data1 = {{Width1,Height},{Width2,Height},...}, where Width1, Width2, … are widths of bins (from 0 to 10, from 10 to 25 and so on) which correspond to…
John Taylor
  • 5,701
  • 2
  • 12
  • 33
2
votes
2 answers

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 single dimensional x-axis. Also, is it possible to…
Lyndon
  • 21
  • 1
2
votes
3 answers

Plotting histogram from a list of bin boundaries and counts V2

I would like to ask the very same question as Plotting histogram from a list of bin boundaries and counts, because I do not find it sufficiently answered. "If I use HistogramList (in mathematica) to create list of bin boundaries and bin counts from…
ango4
  • 45
  • 5
2
votes
3 answers

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 Histogram[], just what you can see on the linked picture. So any ideas how to do this in Mathematica (version…
Bernat
  • 21
  • 2
1
2 3 4