Tag for questions about building histograms in Mathematica. Apart from generating the graphics, and prettifying them, this also includes methods to extract their data.

learn more… | top users | synonyms

4
votes
1answer
654 views

How can I make a list plot with bars?

Can anyone help me please? I don't want a Histogram; I don't want a BarChart, not even a ListPlot with drop down lines. I want a list plot with drop down columns/bars: please see the link. It is ...
4
votes
3answers
228 views

Translating Histogram

SeedRandom[1]; RandomVariate[NormalDistribution[], 100]; Histogram[%, Automatic, "Probability"] The above code produces a histogram like I want to translate ...
4
votes
2answers
830 views

Histogram with variable bin size [closed]

Suppose I have some dataset,e.g., Histogram[RandomVariate[PoissonDistribution[2], 10000], 10] which gives, $\hspace{2cm}$ How can I change the histogram such ...
4
votes
1answer
259 views

DensityHistogram label/display values in Mathematica 8

I'm trying to make a DensityHistogram in Mathematica 8 that overlays the histogram values for each location. What I want is for the value of each square to be ...
4
votes
2answers
228 views

Mysterious behaviour of ParallelTable

This question is related to Export bug in combination with ParallelTable?. The following code shows an even stranger bug than in the upper question. The y-axis should always be logarithmic, but in ...
4
votes
1answer
215 views

How to evaluate differential entropy from raw data?

I want to evaluate the differential entropy according to here $$h(X) = - \int f(x) \log{f(x)} dx$$ where $f$ is the probability density function. Lets create some test data (normal distribution): <...
4
votes
1answer
623 views

How can I have an axis label automatically positioned below the X-axis?

I'm attempting to generate some histograms, and I'd like to automatically label the X-axis. However, Histogram[. . ., AxesLabel -> {"X", "Y"}] places the "X" ...
4
votes
1answer
235 views

Rescuing a vertically clipped histogram

I recently ran a rather time intensive calculation and plotted the results in a histogram by simply called Histogram[data]. However, because of a rather serious error on my part, I recently lost my ...
4
votes
1answer
94 views

Small output glitch with Histogram

I'm experiencing a small formating glitch with an histogram. I want to define an histogram with a square frame, with precise vertical ticks from 0 to 10. But I'm still getting a larger range, and I ...
4
votes
1answer
175 views

spherical histogram for 3D object

I want to develop a shperical histogram for 3D object. Given a 3D object, I put it in a cylinder where its axis pass through the centroid of the object. The cylinder is sampled into a number N of ...
3
votes
5answers
187 views

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 (...
3
votes
1answer
140 views

Random Variate generating strange results when using ProbabilityDistribution

I have created a probability distribution that follows a general normal distribution, given by: $$ \frac{b *e^{-\left(\frac{\sqrt{(x-u )^2}}{a }\right)^{b }}}{2 a \Gamma \left(\frac{1}{b }\right)} $$...
3
votes
3answers
896 views

Comparing 2 Data Sets in a Single Plot

I have 2 data sets, data1 and data2 with large (in the thousands) amounts of data and I want to compare them in a plane. They ...
3
votes
2answers
329 views

Plot contours for 3d histograms

I have a data set which is a list of pairs. From this I can easily make a 3d histogram with Histogram3D[data] or a smoothed ...
3
votes
2answers
580 views

Multiple histograms grouped in a chart

I have this problem: I have three distributions and the relative histograms. But I would like to create an histogram in which the three columns of each single histogram for the same bin are put ...
3
votes
2answers
457 views

Cumulative histogram with log-log scale

How to do a cumulative histogram on Mathematica on a log-log scale? This question is pretty straightforward, but a search didn't help me at all. Keep in mind that all I have is a list of n numbers ...
3
votes
2answers
1k views

Histogram with a logarithmic scale for the y-axis

How can I get a histogram with a logarithmic scale only on the the y-axis? With ...
3
votes
2answers
56 views

DateListPlot from DateHistogram

How do I draw a DateListPlot from the bin height and bin middle position? I have a series of time events from which I calculate DateHistogram, but I want to represent the result through a kind ...
3
votes
1answer
114 views

ImageHistogram with logarithmic y scale

ImageHistogram is much faster than Histogram with ImageData. The only problem: I cannot ...
3
votes
1answer
219 views

How do you make a 3D city population graphic?

I want to make a graphic that has the shape of a country, finds all the cities of that country, gets their coordinates and populations and turns that into a SmoothHistogram3D with the population being ...
3
votes
2answers
1k views

How to extract the probability density function from SmoothHistogram? [duplicate]

I have some data.I plot the histogram with SmoothHistogram in Mathematica. If the y-axis of the histogram is my p(x) function, I want to plot f(x)=(1/n)ln(p(x)) ...
3
votes
1answer
167 views

How to normalize histogram height to unity?

When doing Histogram[data], I get the total nummber of counts in each bin. Doing Histogram[data,Automatic,"Probability"] ...
3
votes
1answer
461 views

Centering histogram bars over axis values

I'd like to center the bars in my histograms over the correct values of the x-axis. Here is a simplified example: The most common value in the dataset is zero, but glancing at the histogram this ...
3
votes
1answer
82 views
3
votes
1answer
244 views

How to create a bar chart from a list of heights *and* bin delimiter positions?

Basically, I'm trying to produce the same output that Histogram[giganticList] would produce, but starting from the output of ...
3
votes
2answers
80 views

Vertical Line in Histogram [closed]

I created a histogram of my data. This was working fine. plotbootstrap = Histogram[data, 30] I now also want to add a vertical line for a certain $x$ value (here ...
3
votes
2answers
72 views

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/...
3
votes
1answer
185 views

How to compare Histogram Data?

I'm using a Dataset ...
3
votes
1answer
329 views

Making multiple sideways histograms/bell curves around temporal data

I don't quite remember what this type of plot is called, but here is the idea: I have some data which is indexed by time, and I want to look at the evolution of the distribution of that data as time ...
3
votes
2answers
324 views

two histograms ratio

I have two histograms and using listplot to draw both. Now, I want to draw a second plot, below the first, with the ratio of each bin. Does anyone know how to do this? Many thanks. This is the code ...
3
votes
1answer
237 views

Binning of listplot [duplicate]

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 ...
3
votes
1answer
166 views

Using bin values and metadata in ChartElementFunction in histograms

The DensityHistogram command lets you specify a ChartElementFunction which according to the documentation: The arguments ...
3
votes
0answers
98 views

AbsoluteOptions of a Histogram with PlotRange [duplicate]

Possible Duplicate: Mathematica: Retrieving PlotRange from Histogram I would like to evaluate the AbsoluteOptions of one of my ...
2
votes
4answers
1k views

How to create a histogram from a given frequency table

I wanted to draw a histogram as in the photo above, I typed the command: ...
2
votes
2answers
319 views

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 ...
2
votes
1answer
326 views

How do I create a histogram out of this datastructure: x[i] = value_i?

Here is my SSCCE: a[1] = 2; a[2] = 3; a[3] = 6; Histogram[a] This throws and error though. Here are my questions: What kind of data type is a? Is it an Array?...
2
votes
2answers
115 views

Histogram distribution

Imagine the following data: data = {-0.7, -0.5, -0.2, 0.1, 0.4, 0.5, 0.9, 1.1, 1.2, 1.3, 1.5, 2.1} From that I make a ...
2
votes
2answers
72 views

Easy way to create an histogram with given heights? [closed]

What is the easiest way to create an histogram with the heights of each bin already determined? I read all the support page on histograms but I don't understand if there is a way to create an ...
2
votes
1answer
173 views

Get histogram of number of vertices per component of graph H

I have a huge graph with ~8k vertices and ~1k components. I want a histogram showing the number of vertices for each component. How do I do this? EDIT: I'm trying ubpdqn's approach, but not gettting ...
2
votes
2answers
435 views

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 ...
2
votes
1answer
228 views

Dual Axis Histogram

I'd like to plot two histograms on top of one another, but they have very different scales. Is it possible to plot a histogram with two y-axes, similar to the custom function found here for plots?
2
votes
1answer
348 views

Making a histogram of a user defined random variable

Suppose I want to generate a histogram of $n$ trials a slightly complicated random variable in Mathematica. Is there an easy way to do this? For instance, to make a histogram of a normal variable one ...
2
votes
2answers
179 views

Extracting counts of contiguous zeros and ones from a binary array

I'm a novice with Mathematica, but you guys have been very helpful to me in the past. I have a binary array [100, J repetitions] consisting of zeroes and ones. I'd like to extract a histogram of the ...
2
votes
2answers
342 views

How do I generate a 3d histogram of runs

This question is an extension of the question I asked here Histogram of runs. What I would like to do now is generate a Histogram3D that has the run duration on the x axis and the mean level on the ...
2
votes
1answer
197 views

Discontinue, then continue x-axis of 2D Histogram

I have the pictured Histogram. It was generated by the following lines: ...
2
votes
1answer
159 views

How to normalise a line in mathematica

I'm working on creating a line plot from a histogram, as in the following: ...
2
votes
1answer
1k views

Weird vertical line when trying to plot a histogram [duplicate]

I'm trying to plot a histogram of a few data points and overlay a plot on it (it's a fit of a geometric distribution to my data). The weird thing is that a vertical line appears always next to the ...
2
votes
1answer
1k views
2
votes
2answers
362 views

Misaligned DensityHistogram, DistributionAxes & PlotRange

data = RandomReal[NormalDistribution[0.5, 0.1], {10000, 2}]; DensityHistogram[data, PlotRange -> 1, Method -> {"DistributionAxes" -> "Histogram"}] The ...
2
votes
2answers
148 views

Dynamic visualization of two histograms

I have two histograms histo1 and histo2: ...