简体   繁体   中英

3d plotting with large z axis

So I am trying to create a 3d plot from a simple 2d gaussian-like line profiles. The two-d plot is fine, but I am hoping to implement az axis which will contain many of these 2d profiles. Is it possible to have multiple 2d plots stacked together into a wireframe 3d plot?

I have chosen point 5000 in the variable data1b in order to get one 2d plot to work. data1bs shape is (71676, 64) spatial is just (64)

fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(111)
plt.plot(spatial, data1b[5000])
plt.xlabel('Wavelength (Angstroms)', fontsize=18)

Is it possible to have say 1000 of these 2d plots inplemented into a wireframe? Below is one of my attempts

ax1a = fig.add_subplot(111, projection='3d')
ax1a.plot_wireframe(data1b[50000:51000], xaxis1[50000:51000], yaxis1[50000:51000)

I am not sure as to the format of each array for 3d implementation. Any help would be much appreciated, thanks!

So answer is that the X and Y arrays are just positional, and the Z array is the dataset to be shown. They do have to be square arrays unfortunately, so in my case the arrays are 64 x 64, but this could be increased by adding more noise to the spatial array.

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