2D and 3D Scatter Histograms from arrays in Python
Here it follows two functions: hist2d_bubble and hist3d_bubble; that may fit for your purpose: import numpy as np import matplotlib.pyplot as pyplot from mpl_toolkits.mplot3d import Axes3D def hist2d_bubble(x_data, y_data, bins=10): ax = np.histogram2d(x_data, y_data, bins=bins) xs = ax[1] ys = ax[2] points = [] for (i, j), v in np.ndenumerate(ax[0]): points.append((xs[i], ys[j], v)) points = … Read more