Package uk.ac.starlink.ttools.example
Class SinePlot
- java.lang.Object
-
- uk.ac.starlink.ttools.example.SinePlot
-
public class SinePlot extends java.lang.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SinePlot.PlanePlotter
Abstracts the way that the table is turned into a 2d plot component.
-
Constructor Summary
Constructors Constructor Description SinePlot(SinePlot.PlanePlotter planePlotter, int count)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Main method.void
run(int updateMillis)
Constructs a plot and posts it to the screen.
-
-
-
Constructor Detail
-
SinePlot
public SinePlot(SinePlot.PlanePlotter planePlotter, int count) throws java.lang.Exception
Constructor.- Parameters:
planePlotter
- object that does the plotcount
- number of points to plot- Throws:
java.lang.Exception
-
-
Method Detail
-
run
public void run(int updateMillis) throws java.lang.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:
java.lang.Exception
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Main method. Use with -help.- Throws:
java.lang.Exception
-
-