The Command REPL

When you open a file interactively, CDFViewer presents a CDFViewer> prompt. It is a full line-editing REPL, so history, completion, and reverse search work just like in the Julia REPL or your shell, and it is the fastest way to drive the viewer. What you select here can also be picked with the mouse in the menu window, which controls the same state. What you type – keyword arguments and save options – belongs at the prompt.

Commands at a glance

Type help to list every command.

CDFViewer> help
┌ Info: Type 'exit' or 'quit' to leave the REPL.
│ Available commands:
│   v: Select a variable (v [variable_name])
│   p: Select a plot type (p [plot_type])
│   over: Overlay another field on the same axis (over [variable|off], over.p [plot_type], over2 …)
│   x: Select x-axis variable (x [variable_name])
│   y: Select y-axis variable (y [variable_name])
│   z: Select z-axis variable (z [variable_name])
│   isel: Select index for a dimension (isel <dim_name> <index>)
│   sel: Select value for a dimension (sel <dim_name> <value>)
│   play: Start playing an animation (play [dim_name])
│   stop: Stop a playing animation (stop)
│   speed: Set play speed (speed [value])
│   pdim: Set play dimension (pdim [dim_name])
│   savefig: Save the current figure (savefig [filename=<filename>, px_per_unit=<Int>, overwrite=<Bool>])
│   record: Record a movie (record [filename=<filename>, framerate=<Int>, range=<range>, overwrite=<Bool>])
│   export: Export the current figure as a string (export)
│   show: Show the current figure (show)
│   hide: Hide the current figure (hide)
│   menu: Show the menu (menu)
│   hidemenu: Hide the menu (hidemenu)
│   theme: Select the Makie theme to draw in (theme [name])
│   refresh: Refresh the plot (refresh)
│   reset: Reset plot settings to default (reset)
│   help: Get help (help)
│   kwargs: Get a list of available keyword arguments (kwargs [category])
│   get: Get the value of a keyword argument (get <kwarg_name>)
│   overview: Show an overview of the dataset (overview)
│   vars: Get a list of variables (vars)
│   varinfo: Get information about a variable (varinfo [variable_name])
│   dims: Get a list of dimensions (dims)
│   plots: Get a list of plot types (plots)
│   conf: Get the current plot configuration (conf)
│   del: Delete a keyword argument (del <kwarg_name>)
│ You can also set parameters directly using 'key=value' syntax.
└ For a list of available keyword arguments, type 'kwargs'.

In the usage strings, <argument> is required and [argument] is optional. If you omit an optional argument of a selection command (for example plain v or p), an interactive picker opens in the terminal where you choose from a list with the arrow keys.

A full reference of all commands is available in REPL Commands.

Setting keyword arguments directly

Any input line that contains a = and does not start with a command name is interpreted as plot keyword arguments.

CDFViewer> colormap=:plasma, title="My Temperature Map"
┌ Info: Current plot settings:
│ colormap => :plasma
└ title => "My Temperature Map"

This is the main mechanism for customizing plots. Customizing Plots has the details.

History

Every committed line is stored persistently in ~/.cdfviewer_history (override the location with the CDFVIEWER_HISTORY environment variable), so your commands survive across sessions.

  • Up/Down arrows walk through the history. If you already typed the beginning of a command, only matching entries are shown (prefix search).
  • Ctrl-R starts a reverse incremental search through the history, exactly like in a shell.

Tab completion

TAB completes contextually at any point of the line. It completes

  • command names at the start of the line,
  • variable names after v, varinfo, and dims,
  • dimension names after x, y, z, isel, sel, pdim, and play,
  • plot types after p,
  • keyword argument names after get and del, in key= position, and after a comma in a multi-argument line.

Exiting

Leave the application with exit, quit, or just q.