# Import libraries
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button

# Create subplot
fig, ax = plt.subplots()
plt.subplots_adjust(bottom=0.35)

# Create and plot sine wave
lamb = np.arange(0.0, 4.0, 0.005)
black =1/( lamb **5 *( np.exp(14.34/(lamb*6.))-1))
l, = plt.plot(lamb, black)

# Create axes for frequency and amplitude sliders
axtemp = plt.axes([0.25, 0.15, 0.65, 0.03])

# Create a slider from 0.0 to 20.0 in axes axfreq
# with 3 as initial value
temp = Slider(axtemp, 'Temperature', 1.0, 6.0, 3)

# Create a slider from 0.0 to 10.0 in axes axfreq
# with 5 as initial value and valsteps of 1.0
#amplitude = Slider(axamplitude, 'Amplitude', 0.0,
#				10.0, 5, valstep=1.0)

# Create function to be called when slider value is changed

def update(val):
	t = temp.val
	l.set_ydata(1/( lamb **5 *( np.exp(14.34/(lamb*t))-1)))

# Call update function when slider value is changed
temp.on_changed(update)

# display graph
plt.show()
