Adjust Axes3D label positioning

I share your frustration. I worked on it for a good half hour and got nowhere. The docs say set_xlabel takes an arg labelpad but I get an error (AttributeError: Unknown property labelpad)! Setting it after the fact doesn’t do anything, on xaxis or w_xaxis. Here’s a crude workaround: import matplotlib matplotlib.use(“TKAGG”) import matplotlib.pyplot as … Read more

ValueError: Unknown projection ‘3d’ (once again)

You will have to import Axes3D to enable the 3d plotting in matplotlib. The official tutorials on 3d plotting can be found here. So the correct imports and code would look like import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # <— This is important for 3d plotting #your code fig = plt.figure() ax = … Read more