-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference: Themes
Hannes Suhr edited this page Mar 9, 2026
·
4 revisions
FastPlot includes a configurable theme system with 5 built-in presets and full customization.
t = FastPlotTheme('dark');
t = FastPlotTheme('default', 'FontSize', 14, 'LineWidth', 2.0);
t = FastPlotTheme(struct('Background', [0 0 0]));Apply to FastPlot:
fp = FastPlot('Theme', 'dark');
fp = FastPlot('Theme', t);| Preset | Description |
|---|---|
'default' |
White background, standard MATLAB colors |
'dark' |
Dark gray background, bright lines |
'light' |
Soft white background, muted lines |
'industrial' |
High contrast, engineering style |
'scientific' |
Publication-ready, serif font, no grid, colorblind-safe palette |
| Field | Type | Description |
|---|---|---|
| Background | RGB triplet | Figure background color |
| AxesColor | RGB triplet | Axes background color |
| ForegroundColor | RGB triplet | Text, tick labels, axis lines |
| GridColor | RGB triplet | Grid line color |
| GridAlpha | number | Grid transparency |
| GridStyle | string | Grid line style ('-', '--', ':', '-.') |
| FontName | string | Font family |
| FontSize | number | Base font size |
| TitleFontSize | number | Title font size |
| LineWidth | number | Default line width |
| LineColorOrder | Nx3 matrix or string | Color palette ('vibrant', 'muted', 'colorblind') |
| ThresholdColor | RGB triplet | Default threshold line color |
| ThresholdStyle | string | Default threshold line style |
| ViolationMarker | string | Default violation marker shape |
| ViolationSize | number | Default violation marker size |
| BandAlpha | number | Default band fill transparency |
Themes cascade with this priority (highest to lowest):
- Element-level override (e.g., Color on addLine)
- Tile theme (setTileTheme)
- Figure theme (FastPlotFigure constructor)
- 'default' preset (fallback)
myTheme = FastPlotTheme('dark', ...
'FontSize', 14, ...
'LineWidth', 2.0, ...
'LineColorOrder', 'colorblind', ...
'GridAlpha', 0.3);
fig = FastPlotFigure(2, 2, 'Theme', myTheme);fig = FastPlotFigure(2, 2, 'Theme', 'dark');
fig.setTileTheme(3, struct('Background', [0.1 0.1 0.2]));FastSense Wiki
API Reference
Guides
Use Cases
Internals
Resources