In [1]:
%matplotlib inline
from pylab import *
from pylab import *

In [2]:
#importing widgets
from ipywidgets import widgets
from IPython.display import display

Basic plot example


In [3]:
from matplotlib.pyplot import figure, plot, xlabel, ylabel, title, show

In [4]:
from IPython.display import display
text = widgets.FloatText()

floatText = widgets.FloatText(description='MyField',min=-5,max=5)
floatSlider = widgets.FloatSlider(description='MyField',min=-5,max=5)


#https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Basics.html
float_link = widgets.jslink((floatText, 'value'), (floatSlider, 'value'))

Here we will set the fields to one of several values so that we can see pre-configured examples.


In [5]:
floatSlider.value=1

In [6]:
txtArea = widgets.Text()
display(txtArea)

myb= widgets.Button(description="234")
def add_text(b):
    txtArea.value = txtArea.value + txtArea.value


myb.on_click(add_text)

display(myb)