Set view
packages = [ "matplotlib", "scipy" ] "fetch" = [ { "files" = [ "./gouge.py", "./plotter.py", "./jig.py", "./util.py" ] } ] plugins = [ "https://pyscript.net/latest/plugins/python/py_tutor.py" ] import matplotlib.pyplot as plt from gouge import Gouge from plotter import Plotter def set_profile(): print("Setting profile view") plotter.view='profile' show() def set_plan(): print("Setting plan view") plotter.view='plan' show() def set_end(): print("Setting end view") plotter.view='end' show() def show(): plotter.make_plot() plt.show() display(fig, target="mpl", append=False) # Build gouge model and solve gouge = Gouge() gouge.set_channel_parabola() gouge.set_profile_flat() gouge.solve() # Draw picture... fig = plt.figure(layout="constrained") plotter = Plotter(fig=fig, gouge=gouge, view="profile") show()