I have the following code that runs to a graph, what I want is to extract the X,Y and Z into a list (so I can copy them later in excel, and play with the numbers), basically the other way around of having a set of data and plotting it into a graph:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import numpy as np
fig = plt.figure()
ax = fig.gca(projection='3d')
N = np.arange(0, 10, 1)
M = np.arange(0, 15, 1)
N, M = np.meshgrid(N, M)
DNM = 3992.88*N - 2585.96*M
surf = ax.plot_surface(N, M, DNM, rstride=1, cstride=1, cmap=cm.jet,
linewidth=0, antialiased=False)
ax.set_zlim(-25000, 20000)
ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
fig.colorbar(surf, shrink=0.5, aspect=10)
plt.show()