David’s answer doesn’t actually work for me, but the way I usually use it looks like this: you can create an axis object, as David mentioned, by creating a new subtitle:
fig = figure() ax = fig.add_subplot(111, projection='3d') ax.scatter(1,2,3)
Scatter () is a method that must be called on an object. The first argument passed to the method is always the object itself. Therefore, when calling this class, instead of the Axes3D class, the object and, therefore, the correct first argument is missing.
Update: ok I did not see the update in David's answer, so now this is the same, of course;)
Harpe source share