Skip to content Skip to sidebar Skip to footer

Change 3d Graph Color (matplotlib)

I have plotted a 3D graph in matplotlib using the following code: #Previously defines lists of data to plot... fig = plt.figure() ax = fig.add_subplot(111,projection='3d') ax.set_

Solution 1:

See the documentation for Axes3D

The function that you are looking for is called set_pane_color(), it is a member of the axis3d class, so you'd call it as such:

ax.w_xaxis.set_pane_color((R,G,B,A))
ax.w_yaxis.set_pane_color((R,G,B,A))
ax.w_zaxis.set_pane_color((R,G,B,A))

http://matplotlib.org/mpl_toolkits/mplot3d/api.html#mpl_toolkits.mplot3d.axis3d.Axis.set_pane_color

Post a Comment for "Change 3d Graph Color (matplotlib)"