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 Details

    • PLOTSERV_PY_RESOURCE

      public static final String PLOTSERV_PY_RESOURCE
      Resource containing plotserv.py.
      See Also:
    • 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 ["", "=", "=", ...]. Must match content of PLOTSERV_PY_RESOURCE.
      See Also:
  • Method Details

    • createPlotWordsCell

      public static JupyterCell createPlotWordsCell(String[] words)
      Creates a cell that will generate a plot.
      Parameters:
      words - arguments of plot function: ["", "=", "=", ...]
    • 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