In [1]:
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.widgets import Slider


k=1.38*10**(-23)
h=6.62*10**(-34)
c=3*10**8

def ysal(valor):
	salida=pow(((valor**5)*(np.exp(1/valor)-1)),(-1))
	#salida=np.sin(valor)
	return salida
class ChangingPlot(object):
    def __init__(self):
        self.inc = 0.001

        self.fig, self.ax = plt.subplots()
        self.sliderax = self.fig.add_axes([0.2, 0.02, 0.3, 0.03],
                                          axisbg='yellow')

        self.slider = Slider(self.sliderax, 'Value', 0, 1, valinit=self.inc)
        self.slider.on_changed(self.update)
        self.slider.drawon = False

	plt.text(0.9,25, 'Danny Fabian Mora 20112005201\nDiego Javier Mena 20092005053', style='italic',bbox={'facecolor':'red','alpha':0.5, 'pad':10})
	plt.text(0.23, 20, r'$\ Ley \ de \ Planck $')
	plt.text(0.52, 18, r'$\ Ley \ de \ Rayleigh-Jeans $')
	plt.text(0.2, 25, r'$\ Limite \ de \ Wien $')
	plt.text(0.8,10,'$\\int_{0}^{\\infty} \\frac{1}{((x^5)*(exp(1/x)-1))} dx=\\frac{\\pi^4}{15}$',fontsize=20)
        x = np.arange(0.01, 1, self.inc)
	x2=np.arange(0.18,1,self.inc)
	x3=np.arange(0.45,1,self.inc)
	y=ysal(x)
	self.ax.plot(x, ((x**5)*(np.exp(1/x)-1))**(-1), x, ((x**5)*(np.exp(1/(0.9*x))-1))**(-1), x, ((x**5)*(np.exp(1/(0.8*x))-1))**(-1))
	self.ax.plot(x3, 1/(x3**4), x3,1/(0.9*x3**4),x3,1/(0.8*x3**4) )
	self.ax.plot(x2,np.exp(((1)/(x2)))*10**(-0.87))
	self.ax.fill(x,y,'b',alpha=0.1)
        self.dot, = self.ax.plot(self.inc, ysal(self.inc), 'bo', markersize=18)


    def update(self, value):
        value = int(value / self.inc) * self.inc
	value2=ysal(value)
        self.dot.set_data([[value],[value2]])
        self.slider.valtext.set_text('{}'.format(value))
        self.fig.canvas.draw()

    def show(self):
        plt.show()

p = ChangingPlot()
p.show()


  File "<ipython-input-1-12a3645a3f27>", line 26
    plt.text(0.9,25, 'Danny Fabian Mora 20112005201\nDiego Javier Mena 20092005053', style='italic',bbox={'facecolor':'red','alpha':0.5, 'pad':10})
                                                                                                                                                   ^
TabError: inconsistent use of tabs and spaces in indentation

In [ ]: