import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
data = np.loadtxt("data.dat")
X, Y = np.meshgrid( data[:,0], data[:,1])
Z = np.tile( data[:,2], (len(data[:,2]), 1))
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X,Y,Z)
plt.show()
Created
April 26, 2020 05:21
-
-
Save biplab37/ff12f4184789862ffd745931046afb4e to your computer and use it in GitHub Desktop.
3d plot matplotlib
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment