restart: with(Maplets): with(Maplets[Elements]): Plot:=proc() local expr,x,range,a,l,Args,tit: expr:=parse(Maplets:-Tools:-Get(TFF)): range:=parse(Maplets:-Tools:-Get(TFR)): a:=parse(Maplets:-Tools:-Get(CBA)): l:=parse(Maplets:-Tools:-Get(CBL)): tit:=Maplets:-Tools:-Get(Title): x:=op(indets(expr,symbol)): Args:=expr,x=range,tickmarks=[3,3], `if`(a,NULL,axes=none), labels=`if`(l,[x,""],["",""]), title=tit: Maplets:-Tools:-Set(Pl=plot(Args)): end: ChangeA:=proc() Maplets:-Tools:-Get(CBL(enabled)): Maplets:-Tools:-Set(CBL(enabled)= evalb(not %)) end: M:=Maplet( Window( [ BoxRow(border=true,inset=0,spacing=0,Plotter[Pl](width=250,height=250)), BoxCell( GridLayout(inset=5, GridRow( GridCell(halign=right,Label("Axes: ")), GridCell(halign=left,CheckBox[CBA](value=true,onchange=Evaluate(function="ChangeA"))), GridCell(halign=right,Label(" Labels: ")), GridCell(halign=left,CheckBox[CBL](value=true)) ), GridRow( GridCell(halign=right,Label("Function: ")), GridCell(halign=left,TextField[TFF](7,halign=right,value="sin(x)")), GridCell(halign=right,Label("Range: ")), GridCell(halign=left,TextField[TFR](7,halign=right,value="-2*Pi..2*Pi")) ) ) ), BoxRow(inset=0,spacing=0, BoxCell(halign=left,Button("Plot",onclick=Plot)), BoxCell(TextField[Title](12,halign=center,value="Function sin(x)")), BoxCell(halign=right,Button("Exit",Shutdown())) ) ] ), Action[Plot](Evaluate(function="Plot")) ): Display(M);