Usage: pgkyl plot [OPTIONS]
Plot one or more datasets onto a shared figure and return it.
Accepts ``plot(a)`` or ``plot(a, b, multiblock=True)``. The first dataset sets the
layout (dimensionality and panel count, after squeezing any size-1 axis left by a
coordinate ``select()``); every dataset (including the first) is then drawn --
overlaid onto the same panels for 1-D, or onto the next ``start_axes``-offset block of
panels when ``num_axes`` spreads multiple datasets' components across one grid (the
old ``--subplots`` behaviour). Set ``overlay_axes=True`` to keep every dataset in the
*same* ``start_axes`` block instead of advancing per dataset -- what the blocks of one
multiblock field want, since they are one field and belong in one panel.
When more than one 2-D dataset is drawn as a ``pcolormesh`` and no explicit
``zmin``/``zmax`` is given, all of them share one per-component color scale (computed
across the whole call) and one colorbar per panel, so the colorbar describes every
dataset on the axes rather than whichever was drawn last.
Bounds such as ``ymin`` and ``zmax`` accept a shared number or a mapping from zero-
based logical panel index to bound. Unspecified panels use their data limits.
Coordinate axes shared by the layout keep common bounds.
Most of the keyword arguments mirror main's ``output.plot``/CLI ``plot`` 1:1
(contour/quiver/streamline/lineouts, shifts/scales, limits, labels, legend, colorbar,
aspect, log axes, xkcd/hashtag/jet, style). ``transpose`` swaps the horizontal and
vertical axes: in 1-D the coordinate moves to the vertical axis; in 2-D the data,
grid, and default labels are swapped before drawing (shifts/scales keep their screen-
axis meaning). ``grid_indices`` replaces each plotted coordinate with its zero-based
sample index without changing the dataset itself. ``save``/``saveas``/ ``no_show``
make the render call self-sufficient: ``saveas`` writes a PNG or PDF according to its
extension (an extension-less name defaults to PNG), while ``save=True`` derives a PNG
name from the input dataset. ``clear`` lets ``render.animate`` redraw onto a
persistent figure across frames. A sequence of ``saveas`` paths writes the same figure
to each path; this is primarily useful to CLI callers that request both a named output
and frame output.
Modal DG data plots each stored coefficient as a separate channel on the cell grid. To
plot the evaluated field, first use ``interpolate`` (uniform mesh), ``local_poly``
(preserves cell jumps), ``represent(to='nodal')`` (basis nodes), or
``represent(to='quad')`` (quadrature points). For native nodal/quadrature heatmaps,
colored patches end at the original cell boundaries, with interior edges midway
between sampling points. The input dataset is unchanged.
For 1-D data, passing ``cmap`` together with ``cval`` colors the line by mapping
``cval`` onto the colormap; ``cval_min``/``cval_max`` set the normalization range
(typically the min/max of the ``cval`` values across all curves), so several curves
drawn into the same axes share one scale. ``color`` accepts either one Matplotlib
color, applied to every line, or a sequence containing one color per dataset (reused
for all its components). A sequence with one color per individual line is also
accepted, in dataset/component order. ``linestyle`` similarly accepts one style
applied to every dataset, or a sequence with one entry per dataset; a one-entry
sequence is broadcast to every dataset.
For 2-D data, ``surface`` draws a 3D surface instead of a ``pcolormesh``. When several
2-D datasets are overlaid onto the same axes for comparison, set ``comparison`` so
each surface/contour gets a distinct color and a legend entry instead of overlapping
and hiding each other. ``alpha`` controls the surface transparency. Set
``legend_subplot`` to a zero-based subplot index to draw the legend only there;
``legend_loc`` accepts any Matplotlib legend location and defaults to ``"best"``.
Explicit ``legend_labels`` are used verbatim on every component, without an added
``_cN`` suffix. In Python, pass ``legend_labels=["new", "old"]``; in the CLI, pass
``--legend_labels '["new","old"]'``. Quote the entire JSON array so the shell
preserves its brackets and double quotes. Repeating ``--legend_labels new
--legend_labels old`` also works. Labels follow dataset input order and are reused on
each component subplot. A comma-separated CLI value without brackets is one literal
label.
``split_linear_log=True`` turns every 1-D component panel into a joined pair split at
``split_point``: coordinates below the point are drawn on the left and coordinates
at/above it on the right. The right side is logarithmic in y by default;
``split_log_side='left'`` reverses which half is logarithmic. ``split_width_ratios``
and ``split_gap`` control the pair's geometry. ``split_linear_ylim`` and
``split_log_ylim`` accept either one ``(min, max)`` pair, a sequence of pairs (one per
component), or a mapping from component index to pair. ``split_legend_side`` is
``'linear'``, ``'log'``, ``'left'``, or ``'right'``. This mode is intentionally
limited to 1-D, non-transposed plots. ``split_seam_ticklabels`` chooses which side
owns the label at the joined boundary: ``'left'`` (the default), ``'right'``,
``'both'``, or ``'none'``.
Options:
-m, --multiblock [BOOLEAN] Force every dataset onto one figure instead of
grouping fields. [default: False]
-a, --args TEXT OR JSON ARRAY Positional Matplotlib plot arguments.
-f, --figure INTEGER Existing or numbered figure to target.
-s, --squeeze [BOOLEAN] Remove singleton spatial axes before laying out
panels. [default: False]
-t, --transpose [BOOLEAN] Swap the horizontal and vertical display axes.
[default: False]
-g, --grid_indices [BOOLEAN] Plot zero-based sample indices instead of grid values.
[default: False]
-n, --num_axes INTEGER Number of logical component axes.
--start_axes INTEGER First logical component axis to use. [default: 0]
-o, --overlay_axes [BOOLEAN] Draw every dataset in the same component-axis block.
[default: False]
--num_subplot_row INTEGER Forced subplot row count.
--num_subplot_col INTEGER Forced subplot column count.
--streamline [BOOLEAN] Draw two-component fields as streamlines. [default:
False]
--sdensity FLOAT Streamline density. [default: 1.0]
--arrowstyle TEXT Streamline arrow style.
--scatter [BOOLEAN] Draw markers without connecting lines. [default:
False]
-q, --quiver [BOOLEAN] Draw two-component fields as arrows. [default: False]
-c, --contour [BOOLEAN] Draw two-dimensional values as contours. [default:
False]
--clevels TEXT Explicit contour-level specification.
--cnlevels INTEGER Number of contour levels.
--cont_label [BOOLEAN] Label contour lines. [default: False]
--surface [BOOLEAN] Draw two-dimensional values as a three-dimensional
surface. [default: False]
--comparison [BOOLEAN] Distinguish overlaid two-dimensional datasets.
[default: False]
--alpha FLOAT Surface or comparison transparency.
-d, --diverging [BOOLEAN] Use a diverging colormap. [default: False]
-l, --lineouts INTEGER Draw this many lineouts from two-dimensional data.
-x, --xmin FLOAT Lower horizontal-axis bound, shared or mapped by panel
index.
--xmax FLOAT Upper horizontal-axis bound, shared or mapped by panel
index.
--xscale FLOAT Horizontal-coordinate scale factor. [default: 1.0]
--xshift FLOAT Horizontal-coordinate shift. [default: 0.0]
-y, --ymin FLOAT Lower vertical-axis bound, shared or mapped by panel
index.
--ymax FLOAT Upper vertical-axis bound, shared or mapped by panel
index.
--yscale FLOAT Vertical-coordinate scale factor. [default: 1.0]
--yshift FLOAT Vertical-coordinate shift. [default: 0.0]
-z, --zmin FLOAT Lower value or color bound, shared or mapped by panel
index.
--zmax FLOAT Upper value or color bound, shared or mapped by panel
index.
--zscale FLOAT Value scale factor. [default: 1.0]
--zshift FLOAT Value shift. [default: 0.0]
-r, --relax [BOOLEAN] Allow relaxed layout behavior for reused figures.
[default: False]
--style TEXT Matplotlib style name or style-file path.
--rcParams TEXT Matplotlib configuration overrides.
--no_legend [BOOLEAN] Suppress legends for line plots. [default: False]
--legend_labels TEXT OR JSON ARRAY
Dataset labels in input order; CLI: --legend_labels
'["new","old"]' (quote the whole JSON array), or
repeat the option.
--legend_subplot INTEGER Zero-based subplot receiving the legend.
--legend_loc TEXT Matplotlib legend location. [default: best]
--forcelegend [BOOLEAN] Retained for compatibility; default curves already
have labels. [default: False]
--no_colorbar [BOOLEAN] Suppress color bars for field plots. [default: False]
--xlabel TEXT Horizontal-axis label override.
--ylabel TEXT Vertical-axis label override.
--clabel TEXT Color-bar label override.
--title TEXT Figure-title override.
--subplot_titles TEXT Per-subplot title specification.
--subplot_xlabels TEXT Per-subplot horizontal-label specification.
--subplot_ylabels TEXT Per-subplot vertical-label specification.
--logx [BOOLEAN] Use logarithmic horizontal coordinates. [default:
False]
--logy [BOOLEAN] Use a logarithmic vertical axis. [default: False]
--logz [BOOLEAN] Use logarithmic values or colors. [default: False]
--split_linear_log [BOOLEAN] Split each one-dimensional panel into linear and log
halves. [default: False]
--split_point FLOAT Coordinate joining the split halves. [default: 0.0]
--split_log_side TEXT Half using logarithmic scaling. [default: right]
--split_width_ratios <FLOAT FLOAT>...
Relative widths of the split halves. [default: 1.0,
1.0]
--split_gap FLOAT Gap between split halves. [default: 0.0]
--split_linear_ylim <FLOAT FLOAT>...
Limits for the linear half.
--split_log_ylim <FLOAT FLOAT>...
Limits for the logarithmic half.
--no_split_right_ticks [BOOLEAN]
Suppress ticks on the right edge of split panels.
[default: False]
--split_legend_side TEXT Split half receiving the legend. [default: log]
--split_log_base FLOAT Logarithm base for the logarithmic half. [default:
10.0]
--split_log_nonpositive TEXT Handling of nonpositive logarithmic values. [default:
clip]
--split_seam_ticklabels TEXT Half owning labels at the split seam. [default: left]
--fixaspect [BOOLEAN] Use equal physical scaling on coordinate axes.
[default: False]
--aspect FLOAT Explicit axes aspect ratio.
-e, --edgecolors TEXT Mesh edge color.
--no_showgrid [BOOLEAN] Suppress plot grid lines. [default: False]
--hashtag [BOOLEAN] Prefix labels with a hash marker. [default: False]
--xkcd [BOOLEAN] Draw using Matplotlib's XKCD context. [default:
False]
--color TEXT Line color or per-line colors.
--markersize FLOAT Line-marker size.
--linewidth FLOAT Line width.
--linestyle TEXT Line style or per-dataset styles.
--figsize <FLOAT FLOAT>... Figure width and height in inches.
-j, --jet [BOOLEAN] Use the legacy jet colormap. [default: False]
--cmap TEXT Matplotlib colormap name.
--cval FLOAT Scalar used to color a one-dimensional curve.
--cval_min FLOAT Lower normalization bound for curve coloring.
--cval_max FLOAT Upper normalization bound for curve coloring.
--save [BOOLEAN] Save to an automatically derived output name.
[default: False]
--saveas TEXT Explicit image output path or paths.
--dpi INTEGER Saved-image resolution. [default: 200]
--no_show [BOOLEAN] Do not display the figures interactively. [default:
False]
--clear [BOOLEAN] Clear a reused figure before drawing. [default:
False]
--help Show this message and exit.