# Class Plot2Notebook

java.lang.Object
uk.ac.starlink.ttools.build.Plot2Notebook

public class Plot2Notebook extends Object
Utility methods for writing JupyterNotebooks that can be used with the plot server.

Since:
  5 Mar 2020
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final JupyterCell`
`PLOT_CELL`
JupyterCell instance that sets up `PLOTWORDS_FUNC`.
`static final String`
`PLOTSERV_PY_RESOURCE`
Resource containing plotserv.py.
`static final String`
`PLOTWORDS_FUNC`
Name of python function that will yield a plot, taking only a single argument which is a string array of the form ["<taskname>", "=<value>", "=<value>", ...].

## Method Summary

Modifier and Type
Method
Description
`static JupyterCell`
`createPlotWordsCell(String[] words)`
Creates a cell that will generate a plot.
`static void`
`main(String[] args)`
Writes to standard output an ipynb file that will generate some plots for any installation (no data required).

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### PLOTSERV_PY_RESOURCE

public static final String PLOTSERV_PY_RESOURCE
Resource containing plotserv.py.

See Also:
  - Constant Field Values

### PLOT_CELL

public static final JupyterCell PLOT_CELL
JupyterCell instance that sets up `PLOTWORDS_FUNC`.

### PLOTWORDS_FUNC

public static final String PLOTWORDS_FUNC
Name of python function that will yield a plot, taking only a single argument which is a string array of the form ["<taskname>", "=<value>", "=<value>", ...]. Must match content of `PLOTSERV_PY_RESOURCE`.

See Also:
  - Constant Field Values

## Method Details

### createPlotWordsCell

public static JupyterCell createPlotWordsCell(String[] words)
Creates a cell that will generate a plot.

Parameters:
  `words` - arguments of plot function: ["<taskname>", "=<value>", "=<value>", ...]

### main

public static void main(String[] args)
Writes to standard output an ipynb file that will generate some plots for any installation (no data required).

Parameters:
  `args` - ignored