Abuse plotbox into working with raw data from GEM2 output
This commit is contained in:
@@ -20,16 +20,19 @@ def main():
|
||||
|
||||
data = {}
|
||||
numeric_headers = []
|
||||
headers = np.genfromtxt(data_path, delimiter=",", skip_header=0, max_rows=1, dtype=str)
|
||||
headers = np.genfromtxt(data_path, delimiter=",", skip_header=0, max_rows=1, dtype=str, comments="#")
|
||||
for i, header in enumerate(headers):
|
||||
data[header] = np.genfromtxt(data_path, delimiter=",", skip_header=1, max_rows=None, dtype=float, usecols=(i,))
|
||||
data[header] = np.genfromtxt(data_path, delimiter=",", skip_header=1, max_rows=None, comments="#", dtype=float, usecols=(i,))
|
||||
|
||||
if np.isnan(data[header][0]):
|
||||
data[header] = np.genfromtxt(data_path, delimiter=",", skip_header=1, max_rows=None, dtype=str, usecols=(i,))
|
||||
data[header] = np.genfromtxt(data_path, delimiter=",", skip_header=1, max_rows=None, dtype=str, comments="#", usecols=(i,))
|
||||
else:
|
||||
numeric_headers.append(header)
|
||||
|
||||
data["Index"] = tuple(range(len(data[numeric_headers[0]])))
|
||||
if len(numeric_headers) > 0:
|
||||
data["Index"] = tuple(range(len(data[numeric_headers[0]])))
|
||||
else:
|
||||
data["Index"] = tuple(range(len(data[headers[0]])))
|
||||
|
||||
fig, ax = plt.subplot_mosaic(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user