Skip to main content

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

417 questions
Filter by
Sorted by
Tagged with
4 votes
1 answer
101 views

### Generate a List of Lists from Two Lists for Histogram Input

I have two lists of equal length: ...
• 43
0 votes
0 answers
37 views

### Color Range of Chart Style in DensityHistogram and How to Annotate?

I have experimental data in the structure of thousands of {x,y} set. So, I want to get the 2D histogram of x and y. I found the Function called DensityPlot and DensityHistogram. The former seemed that ...
• 365
1 vote
1 answer
61 views

### Plotting the logarithm of bin counts with Histogram3D [closed]

I am using Histogram3D to plot 2d data. Sometimes with Histogram I use double logarithmic axis to view e.g. power laws, using ...
• 2,185
2 votes
0 answers
37 views

### How to avoid disparity in BarChart? [duplicate]

Consider the following code ...
• 4,873
3 votes
2 answers
199 views

### How to show two plots with different axes?

What is the easiest way to plot something like where either x-y axes pair is independent of the other. I tried combining BarChart and ...
• 4,873
0 votes
1 answer
118 views

### Bin edges from BinCounts

I'm working with a set of data binning values. I'm using bincount and binlists to find bins that meet a certain criteria and then testing a list to see which are within one of those bins. This list of ...
3 votes
2 answers
115 views

### Histogram styling and layout

Using ChartLayout, the histograms are tiled as expected as below, however the ChartStyle is not reflected (histograms with ...
• 648
2 votes
2 answers
111 views

### Three- dimensional histogram with color

I have data, that has the following form: i x y z c ; where i is a number, that goes from 1 to N, x,y,z are thought of as coordinates, and c is supposed to be a value that I want to present as color. ...
• 31
1 vote
0 answers
36 views

### Low EPS export quality for Histogram/BarChart

I like to export a figure as an EPS and continue to edit it afterwards (e.g., with inkscape). In the past, I was only exporting plots and everything worked fine: figures had high quality, and I could ...
4 votes
2 answers
218 views

### Gray level shading of image histogram bins

How to shade bins in an ImageHistogram to match the image GrayLevel? Inputs Import the following graphic: ...
• 1,082
0 votes
2 answers
61 views

### Modifying horizontal axis of a PDF plot

I have a bunch of particles that I can measure their volume. PDFs of the size distribution by volume of particles, v(a), measured are reasonably well represented by lognormal distributions of the ...
• 357
0 votes
0 answers
72 views

### Plot BarChart and fixing the bars

I have 3 problems plotting the amplitudes of eigenvectors of a matrix H vertically (column). e.g. ...
• 117
6 votes
0 answers
96 views

### SetOptions[Plot, FIlling -> Axis] breaks SmoothHistogram of a CDF

Bug introduced in 12.1 or earlier and persists through 13.3 . UPDATE: I reached out to Wolfram, and they confirmed that it's a bug. I am using version 12.3. Here's a simple plot of some randomly ...
• 133
0 votes
0 answers
26 views

### Is there a simple way to get histogram-styled plots from explicit data? [duplicate]

I have a bunch of data that lends itself to plotting as a histogram, but for various reasons I can't really use the built-in Histogram function, and instead I have ...
• 10.3k
2 votes
3 answers
166 views

### Plotting histogram from a list of bin boundaries and counts V2 [duplicate]

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) ...
• 45
1 vote
0 answers
149 views

### How to make a histogram-like plot?

Consider the following data: ...
• 5,863
0 votes
0 answers
60 views

### Exporting histogram to PDF with log scaled heights does not seem to work on 11.2

I'm on version 11.2 and using Windows 10. Here is some data and a histogram of it with log scaled heights. ...
• 1,521
-4 votes
3 answers
165 views

### Unable to check own distribution

Good afternoon I need to estimate different distributions from some data. Among these distributions, it is necessary to use the Kritsky-Menkel distribution. I set a formula for the distribution ...
• 21
0 votes
0 answers
32 views

### Recreating SmoothDensityHistogram and SmoothKernelDistribution in another programming language [duplicate]

For the purpose of a research project I need to recreate results of some numeric simulation that was done in Wolfram Mathematica (I'm writing it in Python), regardless of the details, there is a ...
• 101
3 votes
1 answer
48 views

### 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"]
• 101
5 votes
2 answers
179 views

### How to add individual plot labels to histograms in a multiple dataset layout?

How can I add individual labels to each histogram in a multiple dataset layout? See the following example: ...
• 1,245
4 votes
1 answer
270 views

### Illustrating the central limit theorem

I'm working on this question is from Wolfram Mathematica online course. I tried my best to find the answer, still not getting it right The question is: Make a list of histograms of 10000 instances of ...
• 317
-1 votes
1 answer
135 views

...
• 4,351
0 votes
0 answers
44 views

### Was there ever a package called "BinThis"?

I'm working my way through someone's old code and rebuilding it. In one of the notebooks it appears they used a package called "BinThis" which I cannot seem to find any documentation for or ...
1 vote
1 answer
97 views

### How to specify bins in the Histogram which are right closed and left open except for the first one?

Consider the following data as an example: data={1,2,3,4,5,6,7}; Histogram[data,{1,9,2}] This produces the following histogram: This has done left closed right ...
• 9,483
1 vote
1 answer
101 views

### Histogram now showing the correct bin width and height [closed]

I have multiple datasets that I want to compare in one histogram with values ranging from von 4 to 20. All of them work correctly except the last one. ...
• 13
1 vote
3 answers
111 views

### How to use PairedBarChart to compare two BoxWhiskerCharts?

I have a time-series of BoxWhiskerCharts comparing two variables. ...
• 6,233
0 votes
0 answers
32 views

### How can I keep a distance to the abscissa axis when specifying an AxisLabel in the form "text"?

These observations are from Mathematica 12.3.0.0 on Linux x86 (64 Bit). With AxisLabel->{"A", "number"} the character ...
• 2,818
1 vote
0 answers
34 views

### How to use ScalingFunctions for multiple superimposed histograms?

Consider the simple MWE ...
• 6,747
0 votes
1 answer
111 views

### Plotting histogram from a list of bin boundaries and counts [closed]

If I use HistogramList (in mathematica) to create list of bin boundaries and bin counts from my data, can I use this list to plot histogram? I want to add the counts from various datasets before ...
• 57
2 votes
2 answers
196 views

### Generate a list of numbers based on histogram data

Given the following histogram data: {{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10, 1}, {129, 57, 46, 42, 40, 40, 43, 45, 57, 129}}. That correspond to the ...
• 101
7 votes
2 answers
363 views

### How to generate a horizontal histogram with words?

I have a dataset of the type: ...
• 1,335
4 votes
4 answers
190 views

### Control plot range of logarithmic histogram

When drawing a histogram with a logarithmic vertical scale, how can I control the vertical plot range? I.e., how can I control where the bars originate? On a linear plot, bars will start at zero, but ...
• 236k
0 votes
2 answers
75 views

### A few questions about histogram plot

Consider the following plot: ...
• 5,863
4 votes
1 answer
58 views

### Floating LogScale histogram

I have a histogram that I represent on a base 10 semi-log scale, and I need to fix the plot range. If I set the lower bound for the logarithmic axis, the histogram bins do not stretch downward fully. ...
• 41
1 vote
1 answer
87 views

### BinCounts for a list - error?

I'm a relative novice with Mathematica and could really use some help. I would like to get the heights of bars from a number of histograms, and thought that BinCounts would be a more efficient way to ...
• 173
4 votes
1 answer
81 views

### Cross sections of Histogram3D in both dimensions

I am trying to visualize a list of about 1 million {x, y} tuples, and for this I made ...
1 vote
1 answer
259 views

### Two dimensional histogram with HistogramList

I have been trying to prepare a 2D histogram from a 2D-list; the dataset is: data=RandomVariate[NormalDistribution[0, 1], {200, 2}]; if I do ...
• 25
2 votes
2 answers
77 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 ...
• 963
7 votes
1 answer
442 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. ...
• 19.1k
4 votes
2 answers
111 views

### DateHistogram with DateReduction -> editing x axis

I have a list of dates spanning over multiple years (i.e.): ...
1 vote
1 answer
109 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 ...
• 477
2 votes
3 answers
194 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 ...
• 1,658
5 votes
2 answers
635 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 ...
1 vote
1 answer
166 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 ...
• 33
4 votes
2 answers
466 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: ...
• 6,747
7 votes
1 answer
503 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
2 answers
196 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 ...
• 23
4 votes
2 answers
209 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 ...
• 243
8 votes
0 answers
121 views

### Why is WeightedData slow?

I have been using WeightedData with Histogram, HistogramList, ...
• 453