I am trying to create a 3D contour data cube using Python. I have 200 files of data which consists of 200 rows and 200 columns of data in each file. I wanted to create a 3d contour data cube with the x-axis as the row, the y-axis as the column, and the z-axis as the combine for all 200 files. Is it possible? Below is the coding I used to create a 2D contour plot.
What I have tried:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
a = 0
df = pd.read_csv(r"FRD " + str(a) + ".tas", delim_whitespace=True)
data = np.asmatrix(df)
x = [x for x in range(0, len(df.columns))]
y = [x for x in range(0, len(df.iloc[:, 1]))]
x, y = np.meshgrid(x,y)
cp = plt.contourf(x,y,df)
plt.show()