Save plot variants

Keep several configurations of the same output in the Session. Each variant has a stable ID, its own configuration, and separate artifacts.

Create, duplicate and render a variant

In Plots, select a row that supports variants and open Data / Variants → Variants…. The Analysis module may also offer a Variants button for the same output.

New from base
Creates a variant from the base plot configuration. It assigns an ID immediately. Closing the editor preserves the new identity.
Duplicate
Select an existing variant and duplicate it to start from its settings. Check the new ID before editing the options.
Edit
Reopens the selected variant. Set Title to identify it in the table and check Enabled for rendering.
Render
Renders the variant with its saved configuration. When it finishes, check the title, ID, and row in Plots.
Delete
Removes the selected variant. Check the ID before confirming. The base plot has its own entry.
Variant ID, Title and Enabled distinguish the two saved Welch variants.
Variant ID, Title and Enabled distinguish the two saved Welch variants.

Variant settings

The tabs and controls available in the editor depend on the plot output. For XYZ, Bindings provides X, Y, Z, Family, and Color as Dataset and variable IDs. Check the Dataset units and shape before changing the source. The renderer reports unavailable resources. For 2D plots with series, open the series editor to bind X/Y and presentation settings for each curve. Modules that use a cache expose the options for their output recipe.

Save saves the recipe. Save and render saves and rerenders. Close closes the editor. Axes… opens the variant’s axis settings. Back in Plots, the Use flag determines whether the resulting row is included in batch operations. Enabled belongs to the variant.

XYZ variant p0001 inherits the base plot bindings and shows them on the Bindings tab.
XYZ variant p0001 inherits the base plot bindings and shows them on the Bindings tab.

Configure a variant that uses the module cache

The Welch averaged spectrum plot is an example with the Plot and Graphics tabs. In the first tab, the provider offers the title, labels, Spectral quantity, X scale, Y scale, and an additional output format. psd_db shows PSD in decibels, psd_linear shows it on a linear scale, asd uses amplitude spectral density, and mean_amplitude uses mean amplitude. Choose linear or log for the axes according to the data. For an additional file, select none, svg, or pdf.

The Welch variant editor shows the Plot and Graphics tabs and spectral quantity controls.
The Welch variant editor shows the Plot and Graphics tabs and spectral quantity controls.

In the test, a variant set to ASD produced its own row. Duplicate assigned a new ID immediately and retained it after Close. On reopening, the editor saved the new title with Enabled turned off. Delete displayed the copy’s ID and artifacts. After confirmation, the copy disappeared from the manager and the first variant remained listed. Using Render in the manager rendered the first variant again without opening the editor.

Set Graphics for a variant

The Graphics tab uses text fields. Leave a field blank to inherit its value. The field names correspond to the variant’s presentation settings.

width_px, height_px, dpi
Set the PNG dimensions in pixels and the resolution. The test rejected a dpi value of zero. Check the dimensions of the generated PNG after each change.
font_unit, font_size, axis_label_font_size, title_font_size, line_width
Use px or pt for text. Set the sizes for ticks, labels, and the title separately, then set the stroke width.
grid_mode, grid_color
Choose both, vertical, horizontal, or none. You can enter a hexadecimal color.
legend_placement, legend_inside_preset, legend_layout, legend_alignment, legend_columns
Control placement, anchoring within the plot, layout, alignment, and columns. See the tables in Legend for the effect of each option.
legend_font_unit, legend_font_size, legend_background, legend_border, legend_border_color, legend_margin_px
Control the font, background, border, and distance from the panel. Set legend_border to 1 to show the border or 0 to hide it.
view_azimuth, view_elevation, projection, aspect_mode, aspect_ratio
Control the 3D view. Choose orthographic or perspective, and auto, xy_equal, data_equal, or manual. With manual, enter three values in aspect_ratio, such as 1;1.2;0.8.
colormap, colorbar_visible, colorbar_label, color_unit, color_min, color_max
Control how the scalar is displayed and scaled as color. Choose an installed palette. In the renderer that rejected plasma, viridis successfully rendered the plot. Use 0 or 1 for the colorbar, auto or source for the unit, and set the limits in ascending order.

PNG dimensions for Welch

In P011-bis, a new Welch variant retained width_px = 1380 and height_px = 760. Save and render confirmed the rerender but produced the 1520 × 840 PNG from the global settings. The native XYZ control variant used its own 1380 × 760 dimensions.

Graphics shows a new Welch variant with only width_px 1380 and height_px 760 set.
Graphics shows a new Welch variant with only width_px 1380 and height_px 760 set.

For Welch, set the global dimensions, select the row, and use Presentation → Graphics… → Apply + rerender current plot. The change applies to the Session. Check the actual PNG dimensions with Graph → Open PNG 1:1.