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:

  1. Switch to the examples tab in the left rail and click any script (#1–#11).

  2. 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
  1. 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

01-signals.jl

Continuous lines!, discrete stem!, zero-order hold stairs!, scatter!, hlines!, and axislegend.

2

02-lorenz.jl

Base-Julia RK4 integration, 3D Axis3 trajectory coloured by time, linked 2D axes (linkxaxes!, hidexdecorations!), and colsize!.

3

03-surfaces.jl

2D comprehensions with surface!, wireframe!, vertex-coloured mesh!, heatmap!, contourf!/contour!, Colorbar, and Label title rows.

4

04-dashboard.jl

Statistical views: barplot!, errorbars!, hist!, band!, area!, twin y axes (twinx), and log-scale stem!.

5

05-layouts-and-themes.jl

with_theme(theme_dark()), nested GridLayout, external Legend (LineElement, MarkerElement, PolyElement), series!, linesegments!, and rich text.

6

06-history-and-export.jl

Cell execution (#%%), immutable snapshot before edits, and exporting PNG/SVG/PDF/interactive HTML (save, render, to_html).

SqueroBase.jl curriculum (7–11)#

#

Example

What it teaches

7

07-session-and-workspace.jl

Selective clearing with clear(:scratch_a, :scratch_b), clear(), clc(), and navigating examples with open_example.

8

08-simulation.jl

State-space pole analysis in LinearAlgebra plus queuing a graph.run (control/state_space) to attached Paperboat backends via simulate.

9

09-optimization-lp.jl

Linear programming via optimize(problem) (f, A, b, lb), feasible polygon poly!, constraints via ablines!, and contourf!.

10

10-optimization-qp.jl

Quadratic portfolio optimization via optimize(problem) (H, Aeq, beq), efficient frontier plotting, and custom tick formatters.

11

11-optimization-nlp.jl

Constrained nonlinear optimization via optimize(problem) (expression string fun and nonlinear inequality nonlcon routed to Ipopt) with annotation!.

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],))