|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.analysis.plot.OpenGraph
uchicago.src.sim.analysis.Plot
public class Plot
A generic point plotting class. This can be used to plot multiple points, plotting a function whose input is some simulation data. Use the plotPoint method to plot the points, updateGraph to display those points, and clear to clear the graph of all the points.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.analysis.plot.OpenGraph |
|---|
CIRCLE, CROSS, DIAMOND, fileName, FILLED_CIRCLE, FILLED_DIAMOND, FILLED_SQUARE, FILLED_TRIANGLE, frame, HISTOGRAM, inNormalState, location, model, movieMaker, plot, PLUS_SIGN, SEQUENCE, SQUARE, title, TRIANGLE, xIncr, xMax, xMin, yIncr, yMax, yMin |
| Fields inherited from interface uchicago.src.sim.gui.MediaProducer |
|---|
MPEG, QUICK_TIME |
| Constructor Summary | |
|---|---|
Plot(java.lang.String title)
Creates a Plot with the specified title. |
|
Plot(java.lang.String title,
SimModel model)
Creates a Plot with the specified title and associated with the specified SimModel. |
|
| Method Summary | |
|---|---|
void |
addLegend(int dataset,
java.lang.String legend)
Adds a legend for the specified dataset. |
void |
addLegend(int dataset,
java.lang.String legend,
java.awt.Color color)
Adds a legend for the specified dataset. |
void |
addLegend(int dataset,
java.lang.String legend,
java.awt.Color color,
int markStyle)
Adds a legend for the specified dataset. |
void |
addLegend(int dataset,
java.lang.String legend,
int markStyle)
Adds a legend for the specified dataset. |
void |
addString(java.lang.String string)
Adds a String to the plot. |
void |
clear(int dataset)
Clears all the points from the specified dataset from the graph. |
void |
clearStrings()
Clears any added strings from the plot. |
void |
fillPlot()
Shrinks or enlarges the scale so that the plotted points all fit. |
static void |
main(java.lang.String[] args)
Tests Plot |
void |
plotPoint(double x,
double y,
int dataset)
Plots a point on the graph. |
void |
record()
Empty method that does nothing. |
void |
setConnected(boolean connected)
Whether or not all the points should be connected. |
void |
setConnected(boolean connected,
int dataset)
Whether or not the points specific to some dataset should be connected. |
void |
updateGraph()
Updates the graph by redrawing the points. |
| Methods inherited from class uchicago.src.sim.analysis.plot.OpenGraph |
|---|
addMovieFrame, closeMovie, createBinDataSource, createListBinDataSource, createSequence, display, dispose, getAxisTitles, getSize, getTitle, getXIncrement, getXRange, getYIncrement, getYRange, setAxisTitles, setBars, setLocation, setMovieName, setSize, setSnapshotFileName, setXIncrement, setXRange, setXTick, setYIncrement, setYRange, step, takeSnapshot, updateXTick, zoom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Plot(java.lang.String title)
title - the title of the plot
public Plot(java.lang.String title,
SimModel model)
title - the title of this Plotmodel - the associated model.| Method Detail |
|---|
public void setConnected(boolean connected)
connected - if true the points are connected
public void setConnected(boolean connected,
int dataset)
connected - if true the points will be connecteddataset - the dataset whose points should be connected
public void plotPoint(double x,
double y,
int dataset)
x - the x coordinate for the point to be plottedy - the y coordinate for the point to be plotteddataset - the dataset for the point to be plottedpublic void record()
record in class OpenGraphpublic void updateGraph()
updateGraph in class OpenGraphpublic void clear(int dataset)
dataset - the number of the dataset to clear.
public void addLegend(int dataset,
java.lang.String legend)
dataset - the number of the dataset to add a legend for.legend - the legend to add.
public void addLegend(int dataset,
java.lang.String legend,
java.awt.Color color)
dataset - the number of the dataset to add a legend for.legend - the legend to add.color - the color of the legend / plot
public void addLegend(int dataset,
java.lang.String legend,
int markStyle)
dataset - the number of the dataset to add a legend for.legend - the legend to add.markStyle - the style of the plotted points
public void addLegend(int dataset,
java.lang.String legend,
java.awt.Color color,
int markStyle)
dataset - the number of the dataset to add a legend for.legend - the legend to add.color - the color of the legend / plotmarkStyle - the style of the plotted pointspublic void fillPlot()
public void addString(java.lang.String string)
public void clearStrings()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||