How to get a three-dimensional histogram from two-dimensional data?
I have two data lists: x=[2006, 2007, 2008, 2009, 2010] y=[700, 560, 450, 500, 570] I needed to build a regular histogram (it was not difficult). But I also need a three-dimensional diagram, as in the figure . I tried various options (for example, bar3d), but it turns out not that. Help, please. import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x= [float(i) for i in input('Input x ').split()] y= [float(i) for i in input('Input y ').split()] hist, xedges, yedges = np.histogram2d(x, y, bins=(4,4)) xpos, ypos = np.meshgrid(xedges[:-1]