I’m attempting to create a wireframe plot and a 3D scatter plot on the identical axes in matplotlib, nevertheless the scatter plot seems beneath the wireframe plot even when it needs to be above it. I attempted to alter the order of the plotting statements however that didn’t remedy the issue.
import numpy as np from matplotlib import pyplot as plt xgrid, ygrid = np.meshgrid(np.arange(-8, 9, 0.5), np.arange(-8, 9, 0.5)) f = lambda x, y: x**2+y**2 z = f(xgrid, ygrid) fig = plt.determine() ax = fig.add_subplot(111, projection="3d") ax.scatter3D(, , , colour="crimson") ax.plot_wireframe(xgrid, ygrid, z) plt.present()
When trying on the graph from above the crimson dot needs to be above the wireframe plot, however this code ends in the dot being beneath the graph. It appears that evidently the wireframe is within the foreground always.
Crimson dot beneath the wireframe plot
Crimson dot is definitely above the wireframe plot
Python – 3.8.2
Matplotlib – 3.2.1
Is it potential to repair this drawback?