How to correctly generate a 3d histogram using numpy or matplotlib built in functions in python?

后端 未结 4 540
难免孤独
难免孤独 2020-12-19 12:05

This is more of a general question about 3d histogram creation in python.

I have attempted to create a 3d histogram using the X and Y arrays in the following code

4条回答
  •  [愿得一人]
    2020-12-19 12:32

    In this answer there is a solution for 2D and 3D Histograms of scattered points. The usage is simple:

    points, sub = hist2d_scatter( radius, density, bins=4 )
    
    points, sub = hist3d_scatter( temperature, density, radius, bins=4 )
    

    Where sub is a matplotlib "Subplot" instance (3D or not) and pointscontains the points used for the scatter plot.

提交回复
热议问题