Tutorial examples#
Squero Studio MX ships an 11-part tutorial covering both SqueroPlot.jl (2D/3D plotting, layouts, themes, snapshots, and export) and SqueroBase.jl (session management, workspace clearing, optimization, and backend simulation). Because both packages are preloaded by the kernel into every session, examples run as written without boilerplate imports.
Opening and running examples#
Shipped examples always open read-only so the built-in tutorial stays intact:
Switch to the examples tab in the left rail and click any script (#1–#11).
Call
open_example(ref)in the Julia console by 1-based index, filename, slug, or symbol:
open_example() # opens example 1 (01-signals.jl)
open_example(3) # opens 03-surfaces.jl
open_example("lorenz") # opens 02-lorenz.jl
open_example(:simulation) # opens 08-simulation.jl
Run the read-only script directly (Run / Ctrl+Enter / Shift+Enter), or click Copy to workspace in the script header to save an editable copy in your workspace folder.
SqueroPlot.jl curriculum (1–6)#
# |
Example |
What it teaches |
|---|---|---|
1 |
|
Continuous |
2 |
|
Base-Julia RK4 integration, 3D |
3 |
|
2D comprehensions with |
4 |
|
Statistical views: |
5 |
|
|
6 |
|
Cell execution ( |
SqueroBase.jl curriculum (7–11)#
# |
Example |
What it teaches |
|---|---|---|
7 |
|
Selective clearing with |
8 |
|
State-space pole analysis in |
9 |
|
Linear programming via |
10 |
|
Quadratic portfolio optimization via |
11 |
|
Constrained nonlinear optimization via |
Quick pattern reference#
# Session control without losing figure history
clear(:tmp) # drop only `tmp` from the workspace
clc() # clear the console log
open_example("signals") # inspect a tutorial example read-only
# Optimization and simulation bridges to Paperboat
optimize((f = [-3.0, -2.0], A = [2.0 1.0; 1.0 2.0], b = [8.0, 8.0], lb = [0.0, 0.0]))
simulate(graph; duration = 10, dt = 0.01, solver = :rk45, variables = (x0 = [1.0, 0.0],))