import matplotlib.pyplot as plt
import h5py
import json
NoSpectra = json.load(open("Setting.json"))[0]["Spectra"];
Spectra = h5py.File("Spectrometer_vis_0.h5", "r")
ShotNo=open("ShotNo","r").read()
fig = plt.figure()
gs = fig.add_gridspec(NoSpectra, hspace=0)
axs = gs.subplots(sharex=True, sharey=True)
fig.set_figheight(10);fig.set_figwidth(20)
plt.suptitle("Golem spectum #" + str(ShotNo))
for i in range(0, NoSpectra):
axs[i].plot(Spectra['Wavelengths'][0:], Spectra['Spectra'][i:][0], label=i)
plt.savefig('ScreenShotAll.png')