Displaying true-colour 2D RGB textures in a 3D plot?
问题 I'm trying to make a 3D plot that consists of a series of 2D planes through an RGB stack, like this: I know that it's possible to do this using mpl_toolkits.mplot3d by passing the x, y, z coordinates and the RGB(A) colours of each pixel to plot_surface : import numpy as np from matplotlib import pyplot as pp from mpl_toolkits.mplot3d.axes3d import Axes3D def plot_stack_slices(rgbstack, scale=(1., 1., 1.), z_interval=10.): fig, ax = pp.subplots(1,1,subplot_kw={'projection':'3d'}) ax.invert