Questions tagged [histogram2d]

131 questions
2
votes
1 answer

Changing subplot sizes and adding colorbar with histogram2d

I'm trying to create a figure with 1 row and 3 columns and struggling with many things. For one, my subplots turn out to be really tiny little slivers and I get an error when trying to add a colorbar. How can I make the subplots be boxes and the…
edub
  • 659
  • 4
  • 8
  • 19
2
votes
1 answer

Ratio of 2D histograms in matplotlib

I have two sets of data from which I am separately plotting 2D histograms using matplotlib's hist2d() as in http://matplotlib.org/examples/pylab_examples/hist2d_log_demo.html. Now I would like to have the ratio of these two 2D histograms (i.e. the…
beranger
  • 23
  • 4
2
votes
0 answers

Matplotlib 2d histogram with statistics

Is there an easy way to provide some basic statistics (RMS for x and y, total number of items etc.) in a legend, like ROOT does: or should I calculate those values manually and add a textbox? How would I do that, since annotating with text needs…
tamasgal
  • 24,826
  • 18
  • 96
  • 135
2
votes
2 answers

Matplotlib stretches histogram2d vertically

I'm using this code: fig = plt.figure(num=2, figsize=(8, 8), dpi=80, facecolor='w', edgecolor='k') x, y = [xy for xy in zip(*self.pulse_time_distance)] H, xedges, yedges = np.histogram2d(x, y, bins=(25, 25)) extent = [-50, +50, 0,…
tamasgal
  • 24,826
  • 18
  • 96
  • 135
1
vote
1 answer

histogram of Bivariate Normal distribution and pdf on Matlab

I have values from a Monte Carlo simulation. now I am supposed to plot the results using a bivariate Gaussian. Since it is experimental data on a specific topic, I was given the empirical formula of the PDF(x,y): and this is the plot I should get(…
1
vote
0 answers

Python and matlab, hist3 and histogram2d difference

I am writing a Python version of a Matlab program that does 2D histogram. I am making a program that calculates a histogram using the hist3 function in Matlab. And in Python I use the numpy function histogram2d. So I want to get a 2D histogram based…
milkz-boi
  • 45
  • 3
1
vote
0 answers

Histogram 2d Visualization

I'm testing plotly.js 2D Histogram contour to show the pressures of a foot, but it changes a lot the shape and it doesn't look like a foot pressure. There is the Codepen to test it, as you can see these are 2 foot, one of them with a lot of missing…
Sebas Bejenaru
  • 129
  • 1
  • 1
  • 10
1
vote
0 answers

How to 2d bin in histogram python

I m a student and I m in a huge trouble, I am trying to visualize a plot of 2 variables x and y the number of data points in x and y are like 100 thousand or similar and the data in is float and almost with 3 decimal placesfoe eg 0.002 or…
Ankur Giri
  • 11
  • 2
1
vote
1 answer

How to define custom function for scipy's binned_statistic_2d?

The documentation for scipy's binned_statistic_2d function gives an example for a 2D histogram: from scipy import stats x = [0.1, 0.1, 0.1, 0.6] y = [2.1, 2.6, 2.1, 2.1] binx = [0.0, 0.5, 1.0] biny = [2.0, 2.5, 3.0] ret =…
gammapoint
  • 1,083
  • 2
  • 15
  • 27
1
vote
1 answer

Get center of bins histograms python

I'm using the hist2d function of matplotlib.pyplot, giving it input some coordinates (x,y). I would like, after having defined the histogram, to get the center of each bin, i.e., the coordinates of the center of each bin. Is there an easy way to get…
Cla
  • 171
  • 1
  • 12
1
vote
2 answers

Histogram based on image as vector graphic

I would like to transform histograms based on images to vector graphics. This could be a start: function preload() { img =…
Anna_B
  • 820
  • 1
  • 4
  • 23
1
vote
1 answer

Division of two plt.hist2d

I have two 2D-histograms, one containing a total number of shots and the other containing the total number of shots succeeded. I would like to divide these two histograms in order to have one with the success rate of shots per zone. This is the…
user15565396
1
vote
0 answers

Using Hexbin with the symlog scale

I want to use a hexbin plot with a 'symlog' scale. Native options allow to use a 'log' scale but not a 'symlog'. Do you see an easy method to obtain it ? The best that I can do is to produce 2 plots and put one next to the other. Here is a minimum…
Alexll7
  • 26
  • 3
1
vote
1 answer

2D histogram where one axis is cumulative and the other is not

Let's say I have instances of two random variables that can be treated as paired. import numpy as np x = np.random.normal(size=1000) y = np.random.normal(size=1000) Using matplotlib it is pretty easy to make a 2D histogram. import matplotlib.pyplot…
Galen
  • 1,128
  • 1
  • 14
  • 31
1
vote
1 answer

2D Histogram with dynamical bin width

I have a problem with creating a histogram in Julia. I would like to have on a logarithmical scale that the bins have all the same size at the outcoming plot. So far I have a fixed bin width (see Code) histogram2d((nu_m, m_ee_val),xlims = (0.01, 1),…
Odysseus
  • 13
  • 3
1 2
3
8 9