我正在尝试使用矩阵中存在的x,y和z数据绘制互易空间图。我的X和Y是网格网格,Z值独立于X和Y值(或坐标)。
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
from sys import argv
import pandas as pd
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import plotly.graph_objs as go
data= np.loadtxt('s1_101.txt', unpack=True)
x = data[0,:]
y = data[1,:]
z = data[2,:]
L = 1.54060
y = np.array(y) + 0.
z = np.array(z) + 0.
X = [ np.cos(y) - np.cos(x) ]
X = np.array(X) + 0.
X = X/L
Y = [ np.sin(y) + np.sin(y) ]
Y = np.array(Y) + 0.
Y = Y/L
main = [X,Y,z]
amen = np.transpose(main)