0

I'm generating a 3D plot in Matplotlib using the following the code

X, Y = np.meshgrid(np.linspace(0,1,x_data.shape[1]), np.linspace(0,1,x_data.shape[0]))

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

x_slice = ax.contourf(x_data, X, Y, 100, offset=0.5, zdir='x')
y_slice = ax.contourf(X, y_data, Y, 100, offset=0.5, zdir='y')
z_slice = ax.contourf(X, Y, z_data, 100, offset=0.5)

I would like one of these slices to have a polar projection, and the other two remain with a cartesian projection. As far as I can tell, the polar projection has to be added to the figure object and cannot be added to the individual axis. Is this correct? Is there a way to get around this and achieve my goal?

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

0 Answers0