|||
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from scipy.interpolate import griddata
fig=plt.figure()
ax = Axes3D(fig)
df=pd.read_csv("02.csv")
x=df["y"]
y=df["x"]
z=df["h"]
x=np.array(x)
y=np.array(y)
z = np.array(z)
ax.plot_trisurf(x,y,z,linewidth=0.1, antialiased=True)
ax.set_zlim(600,800)
C=ax.tricontour(x, y, z,70,zdir='z',offset=650, linewidths=0.3,colors="black" )
#plt.clabel(C,inline=True,fontsize=10)
plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus'] =False
plt.title('xxx')
plt.xlabel("x")
plt.ylabel("y")
plt.show()
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-24 14:32
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社