|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.example.SinePlot
public class SinePlot
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.
Nested Class Summary | |
---|---|
static interface |
SinePlot.PlanePlotter
Abstracts the way that the table is turned into a 2d plot component. |
Constructor Summary | |
---|---|
SinePlot(SinePlot.PlanePlotter planePlotter,
int count)
Constructor. |
Method Summary | |
---|---|
static void |
main(String[] args)
Main method. |
void |
run(int updateMillis)
Constructs a plot and posts it to the screen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SinePlot(SinePlot.PlanePlotter planePlotter, int count) throws Exception
planePlotter
- object that does the plotcount
- number of points to plot
Exception
Method Detail |
---|
public void run(int updateMillis) throws Exception
updateMillis
- if positive, gives an interval in millisecnds
at which the plot should be refreshed;
if non-positive, the data is considered static
Exception
public static void main(String[] args) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |