I have a matplotlib code that generates a simple 2D chart. I want to add sliders widget to it for hte and hre variables (which are arrays) so that hte and hre values can be increased or decreased interactively. Is there a way (I am sure there is because I have seen something like this on matplotlib website but I am not able to integrate it with my code)? Any help will be appreciated. Here is the code:
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FixedLocator, FormatStrFormatter
import matplotlib.pyplot as plt
import numpy as np
from pylab import *
hte=np.array([10,11,12,13,15,20,21,22,25,30])
hre=np.array([1,2,3,4,5,6,7,8,9,10])
k=20*hte
n4=10*hre
t=6
w4=25
x=arange(1,100,10)
d=(log(x)/log(10))/10
y= k + n4 * (d) + t + w4 + 8
matplotlib.pyplot.jet()
lines=plot(x,y)
setp(lines, linewidth=2, color='r')
xlabel('X - Title')
ylabel('Y - title')
title('$Our Chart$')
grid(True)
show()

Following your comment, I selected sliders in a way they multiply the values in the arrays. You should apply your particular algorithm.