Inheritance diagram for org.math.plot.PlotPanel:
Definition at line 33 of file PlotPanel.java.
Public Member Functions | |
PlotPanel (PlotCanvas _canvas, String legendOrientation) | |
PlotPanel (PlotCanvas _canvas) | |
void | addLegend (String location) |
void | removeLegend () |
void | setLegendOrientation (String location) |
void | addPlotToolBar (String location) |
void | removePlotToolBar () |
void | setPlotToolBarOrientation (String location) |
void | setActionMode (int am) |
void | setNoteCoords (boolean b) |
void | setEditable (boolean b) |
boolean | getEditable () |
void | setNotable (boolean b) |
boolean | getNotable () |
LinkedList< Plot > | getPlots () |
Plot | getPlot (int i) |
int | getPlotIndex (Plot p) |
LinkedList< Plotable > | getPlotables () |
Plotable | getPlotable (int i) |
Axis | getAxis (int i) |
String[] | getAxisScales () |
void | setAxisLabels (String...labels) |
void | setAxisLabel (int axe, String label) |
void | setAxisScales (String...scales) |
void | setAxisScale (int axe, String scale) |
void | setFixedBounds (double[] min, double[] max) |
void | setFixedBounds (int axe, double min, double max) |
void | includeInBounds (double...into) |
void | includeInBounds (Plot plot) |
void | setAutoBounds () |
void | setAutoBounds (int axe) |
double[][] | mapData (Object[][] stringdata) |
void | resetMapData () |
void | addLabel (String text, Color c, double...where) |
void | addBaseLabel (String text, Color c, double...where) |
void | addPlotable (Plotable p) |
void | removePlotable (Plotable p) |
void | removePlotable (int i) |
int | addPlot (Plot newPlot) |
int | addPlot (String type, String name, double[]...v) |
void | setPlot (int I, Plot p) |
void | changePlotData (int I, double[]...XY) |
void | changePlotName (int I, String name) |
void | changePlotColor (int I, Color c) |
void | removePlot (int I) |
void | removePlot (Plot p) |
void | removeAllPlots () |
void | addVectortoPlot (int numPlot, double[][] v) |
void | addQuantiletoPlot (int numPlot, int numAxe, double rate, boolean symetric, double[] q) |
void | addQuantiletoPlot (int numPlot, int numAxe, double rate, boolean symetric, double q) |
void | addQuantilestoPlot (int numPlot, int numAxe, double[][] q) |
void | addQuantilestoPlot (int numPlot, int numAxe, double[] q) |
void | addGaussQuantilestoPlot (int numPlot, int numAxe, double[] s) |
void | addGaussQuantilestoPlot (int numPlot, int numAxe, double s) |
void | toGraphicFile (File file) throws IOException |
Static Public Member Functions | |
static void | main (String[] args) |
Public Attributes | |
PlotToolBar | plotToolBar |
PlotCanvas | plotCanvas |
LegendPanel | plotLegend |
Static Public Attributes | |
static final String | EAST = BorderLayout.EAST |
static final String | SOUTH = BorderLayout.SOUTH |
static final String | NORTH = BorderLayout.NORTH |
static final String | WEST = BorderLayout.WEST |
static final String | INVISIBLE = "INVISIBLE" |
static final String | SCATTER = "SCATTER" |
static final String | LINE = "LINE" |
static final String | BAR = "BAR" |
static final String | HISTOGRAM = "HISTOGRAM" |
static final String | BOX = "BOX" |
static final String | STAIRCASE = "STAIRCASE" |
static final String | GRID = "GRID" |
static final Color[] | COLORLIST = { Color.BLUE, Color.RED, Color.GREEN, Color.YELLOW, Color.ORANGE, Color.PINK, Color.CYAN, Color.MAGENTA } |
Protected Member Functions | |
Color | getNewColor () |
void org.math.plot.PlotPanel.addLegend | ( | String | location | ) |
Defines where the legend of the plot should be added to the plot panel.
location | Location where should be put the legend (String). location can have the following values (case insensitive): EAST, SOUTH, WEST, NORTH, INVISIBLE (legend will be hidden in this case). Any other value will be ignored and an error message will be sent to the error output. |
Definition at line 95 of file PlotPanel.java.
References org.math.plot.PlotPanel.EAST, org.math.plot.PlotPanel.INVISIBLE, org.math.plot.PlotPanel.NORTH, org.math.plot.PlotPanel.plotLegend, org.math.plot.PlotPanel.SOUTH, and org.math.plot.PlotPanel.WEST.
Referenced by org.math.plot.PlotPanel.PlotPanel(), and org.math.plot.PlotPanel.setLegendOrientation().
00095 { 00096 if (location.equalsIgnoreCase(EAST)) { 00097 plotLegend = new LegendPanel(this, LegendPanel.VERTICAL); 00098 add(plotLegend, EAST); 00099 } else if (location.equalsIgnoreCase(SOUTH)) { 00100 plotLegend = new LegendPanel(this, LegendPanel.HORIZONTAL); 00101 add(plotLegend, SOUTH); 00102 } else if (location.equalsIgnoreCase(WEST)) { 00103 plotLegend = new LegendPanel(this, LegendPanel.VERTICAL); 00104 add(plotLegend, WEST); 00105 } else if (location.equalsIgnoreCase(NORTH)) { 00106 plotLegend = new LegendPanel(this, LegendPanel.HORIZONTAL); 00107 add(plotLegend, NORTH); 00108 } else if (location.equalsIgnoreCase(INVISIBLE)) { 00109 plotLegend = new LegendPanel(this, LegendPanel.INVISIBLE); 00110 // add(legends, BorderLayout.NORTH); 00111 } else 00112 System.err.println("Orientation " + location + " is unknonw."); 00113 }
void org.math.plot.PlotPanel.removeLegend | ( | ) |
Removes the current legend from the plot panel.
Definition at line 118 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotLegend.
Referenced by org.math.plot.PlotPanel.setLegendOrientation().
00118 { 00119 remove(plotLegend); 00120 }
void org.math.plot.PlotPanel.setLegendOrientation | ( | String | location | ) |
Moves the legend to the specified location.
location | Location where should be put the legend (String). location can have the following values (case insensitive): EAST, SOUTH, WEST, NORTH, INVISIBLE (legend will be hidden in this case). Any other value will be ignored and an error message will be sent to the error output. |
Definition at line 131 of file PlotPanel.java.
References org.math.plot.PlotPanel.addLegend(), and org.math.plot.PlotPanel.removeLegend().
Referenced by org.math.plot.plots.ScatterPlot.main(), org.math.plot.plots.LinePlot.main(), org.math.plot.plots.GridPlot3D.main(), org.math.plot.plots.CloudPlot3D.main(), org.math.plot.plots.CloudPlot2D.main(), org.math.plot.plots.BarPlot.main(), org.math.plot.PlotPanel.main(), and org.math.plot.plotObjects.RasterImage.main().
00131 { 00132 removeLegend(); 00133 addLegend(location); 00134 }
void org.math.plot.PlotPanel.addPlotToolBar | ( | String | location | ) |
Adds a new plot toolbar to the specified location. The previous toolbar is deleted.
location | Location where should be put the toolbar (String). location can have the following values (case insensitive): EAST, SOUTH, WEST, NORTH. Any other value will be ignored and an error message will be sent to the error output. |
Definition at line 145 of file PlotPanel.java.
References org.math.plot.PlotPanel.EAST, org.math.plot.PlotPanel.NORTH, org.math.plot.PlotPanel.plotToolBar, org.math.plot.PlotPanel.removePlotToolBar(), org.math.plot.PlotPanel.SOUTH, and org.math.plot.PlotPanel.WEST.
Referenced by org.math.plot.PlotPanel.PlotPanel(), and org.math.plot.PlotPanel.setPlotToolBarOrientation().
00145 { 00146 if (location.equalsIgnoreCase(EAST)) { 00147 removePlotToolBar(); 00148 plotToolBar = new PlotToolBar(this); 00149 plotToolBar.setFloatable(false); 00150 add(plotToolBar, EAST); 00151 } else if (location.equalsIgnoreCase(SOUTH)) { 00152 removePlotToolBar(); 00153 plotToolBar = new PlotToolBar(this); 00154 plotToolBar.setFloatable(false); 00155 add(plotToolBar, SOUTH); 00156 } else if (location.equalsIgnoreCase(WEST)) { 00157 removePlotToolBar(); 00158 plotToolBar = new PlotToolBar(this); 00159 plotToolBar.setFloatable(false); 00160 add(plotToolBar, WEST); 00161 } else if (location.equalsIgnoreCase(NORTH)) { 00162 removePlotToolBar(); 00163 plotToolBar = new PlotToolBar(this); 00164 plotToolBar.setFloatable(false); 00165 add(plotToolBar, NORTH); 00166 } else 00167 System.err.println("Location " + location + " is unknonw."); 00168 }
void org.math.plot.PlotPanel.removePlotToolBar | ( | ) |
Removes the plot toolbar from the panel.
Definition at line 173 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotToolBar.
Referenced by org.math.plot.PlotPanel.addPlotToolBar().
00173 { 00174 if (plotToolBar == null) 00175 return; 00176 remove(plotToolBar); 00177 }
void org.math.plot.PlotPanel.setPlotToolBarOrientation | ( | String | location | ) |
Moves the plot toolbar to the specified location.
location | Location where should be put the toolbar (String). location can have the following values (case insensitive): EAST, SOUTH, WEST, NORTH. Any other value will be ignored and an error message will be sent to the error output. |
Definition at line 187 of file PlotPanel.java.
References org.math.plot.PlotPanel.addPlotToolBar().
00187 { 00188 addPlotToolBar(location); 00189 }
Axis org.math.plot.PlotPanel.getAxis | ( | int | i | ) |
Return the axis specified in parameter.
i | Axis number. 0 for X, 1 for Y, 2 for Z. |
Definition at line 248 of file PlotPanel.java.
References org.math.plot.canvas.PlotCanvas.getGrid(), and org.math.plot.PlotPanel.plotCanvas.
Referenced by org.math.plot.plotObjects.Axis.main().
00248 { 00249 return plotCanvas.getGrid().getAxis(i); 00250 }
String [] org.math.plot.PlotPanel.getAxisScales | ( | ) |
Returns the scaling for all of the axis of the plot.
Definition at line 257 of file PlotPanel.java.
References org.math.plot.canvas.PlotCanvas.getAxisScales(), and org.math.plot.PlotPanel.plotCanvas.
00257 { 00258 return plotCanvas.getAxisScales(); 00259 }
void org.math.plot.PlotPanel.setAxisLabels | ( | String... | labels | ) |
Sets the name of the axis, in this order: X, Y and Z.
labels | One to three strings containing the name of each axis. |
Definition at line 266 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setAxisLabels().
00266 { 00267 plotCanvas.setAxisLabels(labels); 00268 }
void org.math.plot.PlotPanel.setAxisLabel | ( | int | axe, | |
String | label | |||
) |
Sets the name of the axis specified in parameter.
axe | Axis number. 0 for X, 1 for Y, 2 for Z. | |
label | Name to be given. |
Definition at line 275 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setAxisLabel().
Referenced by org.math.plot.DataSelectPanel.main().
00275 { 00276 plotCanvas.setAxisLabel(axe, label); 00277 }
void org.math.plot.PlotPanel.setAxisScales | ( | String... | scales | ) |
Sets the scale of the axes, linear or logarithm, in this order: X,Y,Z.
scales | Strings containing the scaling, LOG or LIN (case insensitive) for the axes. |
Definition at line 283 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setAxisScales().
00283 { 00284 plotCanvas.setAxisScales(scales); 00285 }
void org.math.plot.PlotPanel.setAxisScale | ( | int | axe, | |
String | scale | |||
) |
Sets the scaling of the specified axis.
axe | Axis number. 0 for X, 1 for Y, 2 for Z. | |
scale | String specifying the scaling. LIN or LOG, case insensitive. |
Definition at line 292 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setAxiScale().
Referenced by org.math.plot.plotObjects.Axis.main().
00292 { 00293 plotCanvas.setAxiScale(axe, scale); 00294 }
void org.math.plot.PlotPanel.setFixedBounds | ( | double[] | min, | |
double[] | max | |||
) |
Sets the boundaries for each axis.
min | Array of at most 3 doubles specifying the min bound of each axis, in this order: X,Y,Z. | |
max | Array of at most 3 doubles specifying the max bound of each axis, in this order: X,Y,Z. |
Definition at line 301 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setFixedBounds().
00301 { 00302 plotCanvas.setFixedBounds(min, max); 00303 }
void org.math.plot.PlotPanel.setFixedBounds | ( | int | axe, | |
double | min, | |||
double | max | |||
) |
Sets the boundaries for the specified axis.
axe | Axis number to modify. 0 for X, 1 for Y, 2 for Z. | |
min | Min bound of the axis. | |
max | Max bound of the axis. |
Definition at line 311 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setFixedBounds().
00311 { 00312 plotCanvas.setFixedBounds(axe, min, max); 00313 }
void org.math.plot.PlotPanel.includeInBounds | ( | double... | into | ) |
Modify bounds of the axes so as to include the point given in parameter.
into | Coords of the point to include in bounds. |
Definition at line 319 of file PlotPanel.java.
References org.math.plot.canvas.PlotCanvas.includeInBounds(), and org.math.plot.PlotPanel.plotCanvas.
00319 { 00320 plotCanvas.includeInBounds(into); 00321 }
void org.math.plot.PlotPanel.includeInBounds | ( | Plot | plot | ) |
Modify axes boundaries so as to include all the points of a given plot.
plot | Plot to include. |
Definition at line 327 of file PlotPanel.java.
References org.math.plot.canvas.PlotCanvas.includeInBounds(), and org.math.plot.PlotPanel.plotCanvas.
00327 { 00328 plotCanvas.includeInBounds(plot); 00329 }
void org.math.plot.PlotPanel.setAutoBounds | ( | ) |
Set bounds automatically.
Definition at line 334 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setAutoBounds().
00334 { 00335 plotCanvas.setAutoBounds(); 00336 }
void org.math.plot.PlotPanel.setAutoBounds | ( | int | axe | ) |
Set bounds automatically for one axis.
axe | Number of the axis to modify. 0 for X, 1 for Y, 2 for Z. |
Definition at line 342 of file PlotPanel.java.
References org.math.plot.PlotPanel.plotCanvas, and org.math.plot.canvas.PlotCanvas.setAutoBounds().
00342 { 00343 plotCanvas.setAutoBounds(axe); 00344 }