简体   繁体   中英

3d plot for 3d numpy array in python

I have a numpy array of shape (3,3,7)

array([[[168.1129    , 168.0569    , 168.03823333, 168.0289    ,
     168.0233    , 168.01956667, 168.0169    ],
    [336.1129    , 336.0569    , 336.03823333, 336.0289    ,
     336.0233    , 336.01956667, 336.0169    ],
    [504.1129    , 504.0569    , 504.03823333, 504.0289    ,
     504.0233    , 504.01956667, 504.0169    ]],

   [[168.1129    , 168.0569    , 168.03823333, 168.0289    ,
     168.0233    , 168.01956667, 168.0169    ],
    [319.3129    , 319.2569    , 319.23823333, 319.2289    ,
     319.2233    , 319.21956667, 319.2169    ],
    [470.5129    , 470.4569    , 470.43823333, 470.4289    ,
     470.4233    , 470.41956667, 470.4169    ]],

   [[168.1129    , 168.0569    , 168.03823333, 168.0289    ,
     168.0233    , 168.01956667, 168.0169    ],
    [302.5129    , 302.4569    , 302.43823333, 302.4289    ,
     302.4233    , 302.41956667, 302.4169    ],
    [436.9129    , 436.8569    , 436.83823333, 436.8289    ,
     436.8233    , 436.81956667, 436.8169    ]]])

X-axis range is [0,0.5,1], Y-axis range is [1,2,3], Z-axis range is [2,4,6,8,10,12,14]. How to create a 3d plot in python for given axis using 3d array data?

By googling "3D plots python". It will probably tell you to use matplotlib 3D: https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM