#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jan 26 14:36:33 2023 @author: macbook """ import matplotlib.pyplot as plt plt.style.use('bmh') plt.rcParams["figure.figsize"] = (10, 5) Datei = open('Si_U_I_curve.txt') inhalt = Datei.read() zeilen = inhalt.split('\n') tabelle = [] for zeile in range(len(zeilen)): spalten = zeilen[zeile].split(';') tabelle.append(spalten) tabelle[zeile][0:] = [float(zahl) for zahl in tabelle [zeile][0:]] y1 = [zeile[1]/1000 for zeile in tabelle] y2 = [zeile[2]/1000 for zeile in tabelle] y_alt = [0.11, 0.13, 0.15, 0.17, 0.19, 0.21, 0.22, 0.23, 0.25, 0.27, 0.29, 0.31, 0.33, 0.35, 0.37] x = [zeile[0] for zeile in tabelle] plt.plot(x,y1, label='26.01.2023, 3305-9') plt.plot(x,y2, label = "26.01.2023, 3305-9" ) plt.plot(x,y_alt, label = "28.04.2021, 3305-11") plt.xlabel("U [V]") plt.ylabel("I [$\mu$ A]") plt.legend(loc= "upper left") plt.savefig('Praktikum_U_I.pdf', dpi=500)