In [1]:
import matplotlib.pyplot as plt
import numpy as np
import sys, os
In [7]:
import matplotlib as mpl
mpl.rcParams.update({'font.size': 24, 'font.family': 'STIXGeneral', 'mathtext.fontset': 'stix'})
In [2]:
%matplotlib inline
In [3]:
with open('kalt-source.csv', 'r') as kfile:
lambdas = [float(x) for x in kfile.readline().split()[1:]]
intensity = [float(x) for x in kfile.readline().split()[1:]]
In [14]:
fig = plt.figure(figsize=(12,9), dpi=100)
ax = fig.add_subplot(111)
ax.plot(lambdas, intensity)
ax.set_xlabel(r'wavelength $\lambda$ [nm]')
ax.set_ylabel('Intensity [counts]')
fig.suptitle('Spektrum kalt')
fig.savefig('spektrum_kalt.png', bbox_inches='tight')
In [10]:
with open('warm-source.csv', 'r') as kfile:
lambdas2 = [float(x) for x in kfile.readline().split()[1:]]
intensity2 = [float(x) for x in kfile.readline().split()[1:]]
In [16]:
fig2 = plt.figure(figsize=(12,8), dpi=100)
ax2 = fig2.add_subplot(111)
ax2.plot(lambdas2, intensity2)
ax2.set_xlabel(r'wavelength $\lambda$ [nm]')
ax2.set_ylabel('Intensity [counts]')
fig2.suptitle('Spektrum warm')
fig2.savefig('spektrum_warm.png', bbox_inches='tight')
In [ ]: