Editor Guide

When you call matplotly(fig), an interactive editor appears inline in your notebook. This page explains each part of the UI.

Layout

The editor has three areas:

┌───────────────────────────────────────────────┐
│ Toolbar:  [Undo] [Redo] [Save] [Apply] [Close]│
├──────────────────┬────────────────────────────┤
│  Sidebar (380px) │  Canvas                    │
│                  │  (live PNG preview)         │
│  ▸ Global        │                            │
│  ▸ Series 1      │                            │
│  ▸ Series 2      │                            │
│  ▸ Legend         │                            │
│  ▸ Profiles       │                            │
└──────────────────┴────────────────────────────┘

Toolbar

The toolbar sits above the sidebar and canvas:

Undo / Redo

Every property change is recorded on a command stack (up to 100 entries). Click Undo to revert the last change and Redo to reapply it.

Save

Opens a dialog where you can export the current figure as an image file. Choose the format (PNG, PDF, SVG, etc.), DPI, and download location.

Apply

Generates reproducible Python code for all your edits and replaces the current notebook cell with the code. The code is also copied to your clipboard. See Code Export for details.

Close (X)

Closes the editor. If you haven’t applied, all changes are reverted and the original figure is restored.

Canvas

The right side of the editor shows a PNG rendering of the figure. It updates automatically whenever you change a setting in the sidebar. Rendering is throttled (minimum 80 ms between redraws) to keep the UI responsive.

Editing workflow

  1. Launch the editor with matplotly(fig).

  2. Expand the Global panel to adjust fonts, axes, and legend.

  3. Expand individual series panels to tweak colors, line styles, markers, etc.

  4. Use Undo/Redo freely — every change is tracked.

  5. Optionally save a style profile for reuse (see Style Profiles).

  6. Click Apply to export the code and close the editor, or Close to discard all changes.