@interact def _(f=input_box(default=x^2-2*x+3,label='Function: '), s=input_box(default='Quadratic', label='Plot Label: ',type=str)): plot(f,-4,4,title=s).show() @interact def _(f=slider([x,sin(x),cos(x),e^x],default=sin(x),label='f :'),n=slider(0,5,step_size=.5, default=3,label='Exponent: '), rs=range_slider(-10,10, default=(-4,4),step_size=1, label='X Limits: ')): g=f^n plot(g,rs,title='f(x)^n').show() @interact def _(Q=checkbox(default=False,label='Show plot?' )): if Q==True: plot(x^2).show() if Q==False: print('Plot is turned off!') @interact def _(f=selector([x^2,-x^3,tan(x),e^x],label='Function 1: '), g=selector([x^2,-x^3,tan(x),e^x],buttons=True,label='Function 2: ') ): plot(f).show() plot(g,color='red').show() @interact def _(M=input_grid(4,4,default = [[-1,2,3,4],[5,-6,7,8],[9,10,-11,12],[13,14,15,-16]],label='Matrix: ', to_value=matrix)): pretty_print('Matrix determinant is:', M.det()) @interact def _(c=color_selector(default=(0,1,0),label='Plot 1 Color: ',hide_box=True),d=color_selector(default=(0,1,1),label='Plot 2 Color: ',hide_box=False)): plot(x^2,color=c).show() plot(x^3,color=d).show()