# 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.

323 questions
Filter by
Sorted by
Tagged with
904 views

### How to make an Histogram where the data are strings? [duplicate]

Histogram[{3, 3, 2, 2, 2, 2, 2, 1, 1}] works great to give you an histogram in which mathematica counts the occurence of each number and makes the plot. Is there a ...
570 views

### How to generate a Log BarLegend for a DensityHistogram

I have a Log count histogram: DensityHistogram[myData, 100, {"Log", "Count"}, ColorFunction -> "Rainbow", ChartLegends -> Automatic] But ...
536 views

### How to create a vertical (smooth) Histogram on the y-axis of a function graph for an uncertain x?

This is my first time posting a question in StackExchange. I have encountered a certain problem and I can't seem too find a solution. Just a word of caution, I am kind of an amateur when it comes to ...
63 views

### Histogram and Random Lists [closed]

Suppose I have the following list listrand of random numbers from RandomReal[-30,30] (where the size of the list is 40). Is ...
119 views

### pass fail criteria as legend in histogram and plot

I have a random data and want to plot the histogram with specific bin ranges. Each value of data[[x]] is actually [(data[[x]]*2.2)/4] with units as microns; where 4 is the magnification of microscope ...
385 views

### How to make a cumulative time plot?

So I'm working with this data set where there is just one input(a date and time) per line in a .csv file. I've let Mathematica understand the input using "DateStringFormat". The time looks like Year-...
220 views

### Plot a histogram according to a set of rules using data from two tables

Let's say I have two Tables A={1.0,2.3,1.5,3.0,1.1,} , B={2,10,3,1,0} and I'd like to plot a histogram in the following way: ...
1k views

### How can I plot histogram with the same number of values in every bin?

For example I have 100 values sample. I'd like to build histogram in which every bin contains, for example, 10 values. How can i do that? Thanks.
1k 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 ...
2k views

### 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 ...
748 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 ...
335 views

### Translating Histogram

SeedRandom; RandomVariate[NormalDistribution[], 100]; Histogram[%, Automatic, "Probability"] The above code produces a histogram like I want to translate the ...
363 views

### Frequency curve for discrete data

I have a huge array of matrices that looks like this ...
601 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?
187 views

### What happened with good old Histogram?

For the sake of demonstration in a class I wanted to use the line: Histogram[Accumulate[RandomReal[{-1, 1}, 100000]], {1}, "Probability"] to get a probability-...
312 views

### Dynamic visualization of two histograms

I have two histograms histo1 and histo2: ...
825 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 ...
614 views

### Creating histograms with specified mean and intervals

I have a set of data that I want to create a histogram for. The thing is, I would like to set the center of the histogram to the mean of the dataset and the intervals to be the standard deviation. How ...
172 views

### How to get the number of entries of histograms in the legend?

I plot three histograms (originating from a large Dataset ds) in one graph ...
473 views

### Histogram 3D: use different bin width in two directions

I'm trying to plot an histogram of a set of data, I would like to use a bin of different width in x and y direction. I've tried using the following two codes: ...
119 views

### How do I plot 3 (x,y,value) on a Histogram3D[] function?

I have been trying to plot data using the Histogram3D function but I've had no luck, in excel I have x, y and a value I want to plot for each pair, do I have to save this as a data file first? I have ...
399 views

### How can I plot a 3D graph that shows how a histogram varies with a particular parameter?

How can I plot a 3D graph that shows how a histogram varies with a particular parameter? A simple example of this would be plotting a histogram of data described by a gaussian. The gaussian is of ...
500 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 ...
12k 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: ...
2k 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 isn'...
1k views

### Polar histogram

I am developing an algorithm to generate a descriptor of a 2D object based on polar histogram. suppose that we have a datalist centered in {cx,cy}. I use 36 bins where I consider 12 angles and 3 ...
296 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 ...
1k 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 ...
226 views

### Setting ChartLabels in a histogram

I have two data sets that I use to build a histogram in the following code: ...
330 views

### How to compare Histogram Data?

I'm using a Dataset ...
236 views

### Comparing heavy tailed and non-heavy tailed distribution using Mathematica

I have data from a heavy tailed distribution (see picture 1) and a non-heavy tailed distribution (see picture 2) and want to compare it using a histogram on log-scale. However the picture 3 does not ...
505 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): <...
116 views

### Automatically sizing elements in a DistributionChart with custom ChartElementFunction

This is a follow-up to some related questions: 46770 and 60600. I'd like to make a DistributionChart where the elements are histograms with my own custom settings. ...
597 views

### Simple pattern/texture for shading chart elements [duplicate]

If I print the following BarChart in black and white, then it is very difficult to tell which bar is "a" and which is "b". ...
386 views

### Histogram from a list of matrices

I have a list of around 100 matrices, that looks like this ...
335 views

### How to get data from DB into dataset with keys

I'm a Mathematica newbie and I have the following problem: I connect to a Oracle DB and read out a set of variables, further on I want to histogram some of the variables. A Dataset seems to be the ...
141 views

### Fill histogram with pattern [duplicate]

Is there a way to fill a histogram with a pattern such as hatched lines? I'm imagining something along the lines of ...
190 views

### Custom SmoothHistogram3D

I decided to make my own SmoothHistogram3D function because I wanted to be able to specify my own bin sizes and not rely on their distribution functions so taking a cue from this answer and bringing ...
205 views

### Issue with combining weighted data log histograms

I have a bit of a strange problem. I'd like to overlay 3 different logarithmic Histograms with two of them stacked and one separate [*]. Without weights the solution is simple: ...
476 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 ...
2k views

### Histogram with variable bin size [closed]

Suppose I have some dataset,e.g., Histogram[RandomVariate[PoissonDistribution, 10000], 10] which gives, $\hspace{2cm}$ How can I change the histogram such ...
2k 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)) ...
1k views

### Map of United States as a 3D histogram

By combining the state data from here and the extrusion code from here I have managed to make prisms of the various US states such as However, the extrusion method looses information about the ...
1k 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 ...
1k views

### How can we create a histogram distribution from binning data?

HistogramDistribution takes a list of data points, creates a histogram from them, and returns this histogram in a form that can be used as a distribution. I ...
258 views

### Discontinue, then continue x-axis of 2D Histogram

I have the pictured Histogram. It was generated by the following lines: ...
189 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 ...
233 views

### Histogram scale error when using DistributionChart

I'm a novice Mathematica user that is having some problems using the HistogramDensity function in a DistributionChart. My observations are heavily skewed to one category and the height of the other ...
Problem description: I have a list of $\{x,y\}$ pairs. I'd like to divide $x$ into equal[*] bins, say $bx_1, bx_2, \ldots$, calculate $\left<y\right>$ for every bin and then plot the bin values ...