Class SinePlot

java.lang.Object
uk.ac.starlink.ttools.example.SinePlot

public class SinePlot extends Object
Example programmatic use of stilts plot2 classes. This program plots a number of points near a sinusoidal curve. Optionally, the data can change and be replotted at time intervals. Either way, the plot is "live"; you can pan and zoom round it using the mouse.

Two alternative ways of setting up the plot are provided by way of example, but they have the same effect.

To use this class invoke the main() method from the command line. Use the -h flag for options.

Since:
12 Jun 2014
Author:
Mark Taylor
  • Constructor Details

    • SinePlot

      public SinePlot(SinePlot.PlanePlotter planePlotter, int count) throws Exception
      Constructor.
      Parameters:
      planePlotter - object that does the plot
      count - number of points to plot
      Throws:
      Exception
  • Method Details

    • run

      public void run(int updateMillis) throws Exception
      Constructs a plot and posts it to the screen.
      Parameters:
      updateMillis - if positive, gives an interval in millisecnds at which the plot should be refreshed; if non-positive, the data is considered static
      Throws:
      Exception
    • main

      public static void main(String[] args) throws Exception
      Main method. Use with -help.
      Throws:
      Exception