Ich habe dieses Plot:
Code: Alles auswählen
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import math
import numpy as np
import matplotlib.pyplot as plt
h = 6.6260695729*10**(-34) #Js
h_bar = h/(2*math.pi)
meff = 9 #units
kf = 921.04 #N/m
a = (h_bar**2/(meff*kf))**(1/4)
N2 = (8*a*math.pi**(1/2))**(-1/2)
#task 10; plot the function called psi2
x = np.arange(-20*10**(-12), 20*10**(-12), 1*10**(-12))
y = x/a
psi2=N2*(4*y**2-2)*np.exp(-y**2/2)
plt.plot(x, psi2)
plt.show()
Bonusfrage (weil ich es für ein späteres Plot brauche): ist es auch möglich nur die x-akse in 20*10^(-12) zu ändern (also dass es von 20-20 geht) OHNE dass e-12 steht?
LG und vielen Dank schon mal!