pgkyl plotly

Usage: pgkyl plotly [OPTIONS]

  Render 2-D surface or 3-D volumetric data with Plotly.

  2-D data (``num_dims == 2``, after squeezing any size-1 axis) is drawn as a
  ``go.Surface`` (height map); 3-D data is drawn as a ``go.Volume`` or, with
  ``scatter=True``, a ``go.Scatter3d`` point cloud. Multi-component data lays out one
  scene per component unless ``squeeze`` is set.

  ``save``/``saveas``/``show`` make this call self-sufficient without any CLI glue:
  ``show=True`` opens an auto-rotating HTML preview in the browser; ``saveas`` (or
  ``save=True`` for an auto-derived name from ``data``'s source file) writes it instead
  -- ``.mp4``/``.gif``/``.html`` extensions get the rotating camera baked in (via
  :func:`save_rotating_plotly_figure`), any other extension a plain static ``.html``. If
  both a save and ``show=True`` are requested, the just-saved file is what opens (no
  separate preview render). All three default to inert (``show=False``, ``save=False``)
  -- a bare ``pg.load(f).interpolate().plotly()`` just builds and returns the figure, no
  file written and no browser opened; the generated CLI has exactly the same defaults.

Options:
  -s, --squeeze [BOOLEAN]         Draw only the first component and collapse singleton
                                  axes.  [default: False]
  -n, --num_subplot_row INTEGER   Forced row count for multi-component subplot layouts.
  --num_subplot_col INTEGER       Forced column count for multi-component subplot
                                  layouts.
  --scatter [BOOLEAN]             Draw 3-D data as a point cloud instead of a volume.
                                  [default: False]
  -m, --marker_radius FLOAT       Scatter-marker radius.  [default: 4.0]
  --markerstyle TEXT              Plotly scatter-marker symbol.  [default: circle]
  -d, --diverging [BOOLEAN]       Center a diverging color range on zero.  [default:
                                  False]
  -x, --xscale FLOAT              Horizontal-coordinate scale factor.  [default: 1.0]
  --xshift FLOAT                  Horizontal-coordinate shift applied before scaling.
                                  [default: 0.0]
  -y, --yscale FLOAT              Vertical-coordinate scale factor.  [default: 1.0]
  --yshift FLOAT                  Vertical-coordinate shift applied before scaling.
                                  [default: 0.0]
  -z, --zscale FLOAT              Third-coordinate scale, or 2-D surface-height scale.
                                  [default: 1.0]
  --zshift FLOAT                  Third-coordinate shift, or 2-D surface-height shift.
                                  [default: 0.0]
  -c, --cmin FLOAT                Color-range lower bound.
  --cmax FLOAT                    Color-range upper bound.
  --cscale FLOAT                  Color-value scale factor.  [default: 1.0]
  --cshift FLOAT                  Color-value shift.  [default: 0.0]
  --clim <FLOAT FLOAT>...         Explicit ``(minimum, maximum)`` color range.
  --style TEXT                    Postgkyl/Matplotlib style used to derive colors.
  -r, --rcParams TEXT             Matplotlib configuration overrides used while deriving
                                  styles.
  -b, --background TEXT           ``"dark"`` or ``"light"`` scene theme.  [default:
                                  dark]
  -i, --invert_cmap [BOOLEAN]     Reverse the selected colormap.  [default: False]
  --no_legend [BOOLEAN]           Suppress labeled traces in the legend.  [default:
                                  False]
  -l, --label_prefix TEXT         Prefix for component trace names.  [default: ""]
  --no_colorbar [BOOLEAN]         Suppress the color bar.  [default: False]
  --xlabel TEXT                   Horizontal-axis label override.
  --ylabel TEXT                   Vertical-axis label override.
  --zlabel TEXT                   Third-axis label override.
  --clabel TEXT                   Color-bar label override.
  -t, --title TEXT                Figure-title override.
  --logx [BOOLEAN]                Use a logarithmic horizontal axis.  [default: False]
  --logy [BOOLEAN]                Use a logarithmic vertical axis.  [default: False]
  --logz [BOOLEAN]                Use a logarithmic third axis.  [default: False]
  --logc [BOOLEAN]                Use logarithmic color values.  [default: False]
  -a, --aspect TEXT               Scene aspect mode (``auto``, ``cube``, ``data``), or
                                  numeric ratio.
  --no_showgrid [BOOLEAN]         Suppress scene grid lines.  [default: False]
  --hashtag [BOOLEAN]             Add a ``#pgkyl`` annotation.  [default: False]
  --xkcd [BOOLEAN]                Derive colors from Matplotlib's XKCD style.  [default:
                                  False]
  --color TEXT                    Replace the colormap with one fixed trace color.
  -o, --opacity FLOAT             Surface, volume, or marker opacity.  [default: 1.0]
  --scatter_opacity_range <FLOAT FLOAT>...
                                  Minimum and maximum opacity encoded in scatter colors.
  --scatter_opacity_log [BOOLEAN]
                                  Map scatter opacity logarithmically.  [default: False]
  --maximum_points_per_axis INTEGER
                                  Downsample 3-D data to this many points per axis; zero
                                  disables downsampling.  [default: 0]
  --surface_count INTEGER         Number of isosurfaces used by volume rendering.
                                  [default: 32]
  --xrange <FLOAT FLOAT>...       Explicit horizontal-axis range.
  --yrange <FLOAT FLOAT>...       Explicit vertical-axis range.
  --zrange <FLOAT FLOAT>...       Explicit third-axis range.
  -f, --figsize <INTEGER INTEGER>...
                                  Figure width and height in hundreds of pixels.
  --cylindrical_to_cartesian [BOOLEAN]
                                  Interpret 3-D coordinates as ``(R, Z, phi)``.
                                  [default: False]
  --cmap TEXT                     Matplotlib colormap name.
  --save [BOOLEAN]                Save using a name derived from the input dataset.
                                  [default: False]
  --saveas TEXT                   Explicit output path.
  --show [BOOLEAN]                Open the saved or temporary HTML preview in a browser.
                                  [default: False]
  --azimuthal_angle FLOAT         Initial camera azimuth for rotating output.  [default:
                                  0.0]
  -p, --polar_angle FLOAT         Camera polar angle for rotating output.  [default:
                                  85.0]
  --rotation_period FLOAT         Seconds per camera revolution for animated output.
                                  [default: 40.0]
  --fps INTEGER                   Frames per second for animated output.  [default: 1]
  --help                          Show this message and exit.

Python API