Questions tagged [histogram2d]

131 questions
1
vote
2 answers

Standard deviation from numpy 2d histogram

Is there a method to determine the standard deviation in each bin using the numpy histrogram2d method, given a series of 2d coordinates along with weighted values for each coordinate?
EMal
  • 43
  • 1
  • 4
1
vote
0 answers

How does numpy.histogram2d() work?

While reading up on numpy, I encountered the function numpy.histogram2d(). What is it for and how does it work? and how to understand the first returned parameter H ? reference: numpy.histogram2d
J.Zhao
  • 2,250
  • 1
  • 14
  • 12
1
vote
1 answer

Pandas/Python: 2D histogram fails with value error

I am trying to create a 2D histrogram from a Pandas data frame "rates" The X and Y axis are supposed to be transforms from the dataframe, i.e., the X and Y axis are 'scaled' from the original frame columns and the bin heigths are according to the…
THX
  • 553
  • 2
  • 8
  • 18
1
vote
2 answers

Creating a simple python bar chart / histogram using data in dictionary

freq = {1: 1000, 2: 980, 4: 560, ... 40: 3, 41: 1, 43: 1} (Between 1 to 43, not all numbers are keys) I want to make a histogram and plot it, such that I can see each key on the X axis, and the values on Y axis using matplotlib. How do I do this? I…
pratik_m
  • 67
  • 1
  • 9
1
vote
1 answer

Normalize 3d histogram so the sum under the curve = 1 in Matlab

I need to understand how can I make the 3d histogram of a data I have normalized, so the area under =1. I have data=[data_x,data_y]; [HIST,Cent]=hist3(data]; I have read the post in : MatLab: Create 3D Histogram from sampled data But stil I cant…
KaMu
  • 15
  • 4
1
vote
2 answers

Matplotlib and numpy histogram2d axis issue

I'm struggling to get the axis right: I've got the x and y values, and want to plot them in a 2d histogram (to examine correlation). Why do I get a histogram with limits from 0-9 on each axis? How do I get it to show the actual value ranges? This is…
tamasgal
  • 24,826
  • 18
  • 96
  • 135
1
vote
0 answers

how to use google.visualization.arrayToDataTable() function for reusable charts

I am trying to implement google visualization api to draw histogram from any file or array. I am trying to punch in my array that contain the csv data into google.visualization.arrayToDataTable() function, but it is not working. Does anyone know…
user3050590
  • 1,656
  • 4
  • 21
  • 40
1
vote
0 answers

faster histogram2d calculations in numpy

I have a code that calculates entropies for joint distributions and am using histogram2d to calculate **pairwise ** joint entropies of all columns for matrices of size 20000 x 300 (& such large datasets) ie., n * n-1/2 calculations Most of the time…
nahsivar
  • 1,099
  • 1
  • 10
  • 13
1
vote
2 answers

Obtain frequencies in each bin for histogram2d

I have 5 points (x,y) and used matplotlib's histogram2d function to create a heatmap showing different colors denoting the density of each bin. How could I obtain the frequency of the number of points in the bins? import numpy as np import…
user1879926
  • 1,283
  • 3
  • 14
  • 24
1
vote
1 answer

changing the distance of y axis in histogram GNUPLOT

I try to make this histogram with GNUPLOT but i can't understand how to show the names of the nations (i put also my dati.dat file). Here the code: reset set terminal pngcairo size 500,500 enhanced font 'Verdana,10' set output 'Err_rev.png' #…
1
vote
1 answer

Build up and plot Matplotlib 2d histogram in polar coordinates using the Legendre Polynomials

I am attempting to plot a distribution: This is the temperature distribution inside of a sphere of radius (a) whose upper hemisphere is held at T=1 and lower hemisphere is held at T=0 (ignore the discontinuity at the boundary between the two…
codeAndStuff
  • 507
  • 6
  • 19
1
vote
1 answer

What does extent do within imshow()?

Im wanting to use imshow() to create an image of a 2D histogram. However on several of the examples ive seen the 'extent' is defined. What does 'extent' actually do and how do you choose what values are appropriate?
blablabla
  • 304
  • 1
  • 8
  • 18
1
vote
1 answer

How to plot a 2d histogram?

Essentially i need to add several 2d histograms together but im not sure how to do this. Before when i did it for a single histogram i did it like this... enter for i in range(0,BMI[ind_2008].shape[0]): id_temp=ID[ind_2008[i]] …
blablabla
  • 304
  • 1
  • 8
  • 18
1
vote
1 answer

can I plot 2 sets of data in the same density histogram (mathematica)?

can I plot 2 different sets of data ({x1,y1} and also {x2,y2}) in the same density histogram (mathematica)? I don't know if that is possible due to superposition of colors.
0
votes
0 answers

Getting back the values corresponding to minima from a binned 2D histogram data

I am calculating Free Energy by binning 2 variables and getting a negative log of the histogram. I use Contacts and distance-between-helix from every frame of my trajectory as two variables and calculate 2D free energy. With the available free…
1 2 3
8 9