|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.GHPanel
jhplot.GHFrame
jhplot.HPlot
public class HPlot
HPlot class to create a 2D canvas with several plots. It is based on JPlot.
Constructor Summary | |
---|---|
HPlot()
Construct a HPlot canvas with a single plot with the size 600x400. |
|
HPlot(java.lang.String title)
Construct a HPlot canvas with a plot with the size 600x400. |
|
HPlot(java.lang.String title,
int xs,
int ys)
Construct a HPlot canvas with a single plot. |
|
HPlot(java.lang.String title,
int xs,
int ys,
boolean set)
Construct a HPlot canvas with a single plot. |
|
HPlot(java.lang.String title,
int xsize,
int ysize,
int n1,
int n2)
Create HPlot canvas with several plots. |
|
HPlot(java.lang.String title,
int xsize,
int ysize,
int n1,
int n2,
boolean set)
Create HPlot canvas with several plots. |
Method Summary | |
---|---|
void |
add(HKey label)
Add a key to the Canvas. |
void |
add(HLabel label)
Add a label to the Canvas. |
void |
add(HMLabel label)
Add a multiline label to the Canvas. |
void |
add(HShape ob)
Add a shape primitive to the Canvas. |
hep.aida.IAnalysisFactory |
analF()
Return IAnalysisFactory associated with the plot |
double |
axisLengthX()
Length of X axis |
double |
axisLengthY()
Length of Y axis |
void |
clear()
Clear the current graph including graph settings. |
void |
clear(int i1,
int i2)
Clear the graph characterised by an index in X and Y. |
void |
clearAll()
Clear all graphs from data and settings. |
void |
clearAllData()
Clear all graphs from the input data. |
void |
clearData()
Clear the current graph from the input data. |
void |
clearData(int i)
Remove one data set from the current plot. |
void |
clearData(int i1,
int i2)
Clear data of the graph characterised by an index in X and Y. |
void |
close()
Close the canvas (and dispose all components). |
void |
distroy()
Remove the canvas frame |
void |
draw(jplot.DataArray inputDA,
int index)
Draw input data represented by DataArray |
boolean |
draw(F1D f1)
Draw an one-dimensional function. |
void |
draw(F1D[] f)
Draw array of F1D holders |
boolean |
draw(F1D f1,
boolean startZero)
Draw an one-dimensional function. |
boolean |
draw(FND f1)
Draw an one-dimensional function from FND |
boolean |
draw(FND f1,
boolean startZero)
Draw an one-dimensional function from FND. |
void |
draw(H1D h1)
Plot 1D histogram. |
void |
draw(H1D[] h1)
Draw array of histograms |
void |
draw(HKey label)
Draw a key. |
void |
draw(HLabel label)
Draw a label. |
void |
draw(HShape ob)
Draw a shape primitive to the Canvas. |
void |
draw(P1D d)
Draw data in form of P1D |
void |
draw(P1D[] d)
Draw array of P1D holders |
void |
drawStatBox(H1D h1)
Draw a statistical box (mean, RMS, number of entries) |
void |
drawTextBox(java.lang.String[] lines)
Draw a text box with some information |
void |
factories()
Create various JAIDA factories: IAnalysisFactory, ITree, IFitFactory, IFunctionFactory |
int |
fit(H1D h1,
java.lang.String predefFunc,
java.lang.String method)
Fit 1D histogram with the function F1D |
hep.aida.IFitFactory |
fitF()
Return FitFactory associated with the plot |
hep.aida.IFunctionFactory |
funcF()
Return FunctionFactory associated with the plot |
boolean |
getAntiAlias()
Get antialiasing for the graphics of the current plot |
java.awt.Color |
getAxesColor()
Returns the actual color of the axes of the graph. |
double |
getAxesRatio()
Returns the current ratio between X- and Y-axes lengths. |
boolean |
getAxesRatioUse()
Says whether we should use a fixed ratio between X- and Y-axes lengths. |
int |
getAxisArrow()
Gets axis arrows. |
int |
getAxisPenTicWidth()
Get the pen width to draw tic axes |
java.awt.Color |
getBackgColor()
Returns the actual background color of the entire graph panel. |
java.awt.Color |
getBackgColorGraph()
Returns the background color of the current graph. |
java.awt.Color |
getBoxColor()
Returns the color used to draw the bounding box. |
java.awt.Color |
getBoxFillColor()
Returns the fill-color of the eventual bounding box arround the graph |
float |
getBoxOffset()
Returns the offset of the bounding box. |
java.util.Vector<jplot.DataArray>[][] |
getData()
Get the vector which keeps all the data |
jplot.GraphSettings |
getGraphSettings()
Get graph settings for current plot |
jplot.GraphSettings |
getGraphSettings(int n1,
int n2)
Get graph settings |
java.awt.Color |
getGridColor()
Sets the color of the overall grid. |
java.awt.Color |
getInnerColor()
Returns the color used to fill the shaded triangles. |
jplot.JPlot |
getJPlot()
Get jplots for each graph for current graph |
jplot.JPlot |
getJPlot(int n1,
int n2)
Get jplots for each graph |
java.awt.Font |
getLegendFont()
Returns the font used by the legend. |
double |
getLegendPos(int axis)
Returns the x or y coordinates (defined in pixels, relative to the size of the panel showing the graph) of the legend. |
boolean |
getLegendPosUse()
Returns whether or not we use the legend coordinates. |
double |
getLegendSpacing()
Returns the vertical spacing, between each line of the legend. |
double |
getMarginBottom()
Returns the distance between the bottom-border of the panel and the bottom X-axis. |
double |
getMarginLeft()
Returns the distance between the left-border of the panel and the left Y-axis. |
double |
getMarginRight()
Returns the distance between the right-border of the panel and the right Y-axis. |
double |
getMarginTop()
Returns the distance between the top-border of the panel and the top X-axis. |
int |
getMaxNumberOfSubticsLog()
Returns the maximum number of subtics for log scale (default is 10). |
double |
getMaxValue(int axis)
Returns the maximum data value for the specified axis. |
double |
getMinValue(int axis)
Returns the minimum data value for the specified axis. |
int |
getNumberOfTics(int axis)
Returns the number of tics for the specfied axis. |
java.awt.Dimension |
getPanelSize()
Returns the dimensions of the panel used to display the graph. |
double |
getPenWidthAxis()
Get pen width to draw axis |
boolean |
getShadow()
Returns whether or not a shadow will be drawn at the panel border. |
double |
getSubTicLength(int axis)
Returns the length of the sub-ticks. |
void |
getSubTicNumber(int axis)
Get the number of subtics for a given axis |
java.awt.Color |
getTicColor(int axis)
Returns the color used by the labels drawn at each tick. |
java.awt.Font |
getTicFont(int axis)
Returns the font used by the labels drawn at each tic. |
double |
getTicLength(int axis)
Returns the length of the ticks. |
boolean |
getTicsMirror(int axis)
Returns whether or not we should draw tics on the mirror axis. |
boolean |
getTicsRotate(int axis)
Returns whether or not we should rotate the tics. |
hep.aida.IHistogramFactory |
histF()
Return IHistogramFactory associated with the plot |
boolean |
isAxisShown(int axis)
Returns whether an axis line will be drawn or not. |
boolean |
isGridToFront()
Flag, saying whether the grid should be drawn at the foreground or not. |
boolean |
isMirrorAxisShown(int axis)
Returns whether the mirror of an axis will be drawn or not. |
boolean |
isPrimitivesToFront()
Flag, saying whether primitives should be drawn at the foreground or not. |
boolean |
isTicLabelsShown(int axis)
Returns whether or not to draw the tick labels |
boolean |
isTicsShown(int axis)
Returns whether or not to draw tics (little lines on the axes). |
int |
numberLabels()
No labels on the current plot. |
int |
numberPrimitives()
No of primitives for the current plot. |
void |
printGraphSettings()
Print the current graph settings to System.out |
void |
printGraphSettings(java.io.PrintStream out)
Print the current graph settings to System.out |
void |
quit()
Quit the canvas (and dispose all components) Note: a memory leak is found - no time to study it. |
void |
read(java.lang.String file)
Read HPlot file and inserts graphs to the main frame. |
void |
RefreshFrame()
Refresh all the frames |
void |
removeAxes()
remove X and Y axes, tics, axis labels on the current plot. |
void |
removeGraph()
Remove all components from the JHPlot frame. |
void |
removeLabel(int i)
remove i-th HLabel or HMLabel on the current plot |
void |
removeLabels()
remove HLabels and HMLabels on the current plot |
void |
removeLabelsAll()
remove all Labels on all plots. |
void |
removePrimitives()
remove 2D java primitives on the current plot |
void |
removePrimitives(int i)
remove i-th 2D java primitives on the current plot |
void |
removePrimitivesAll()
remove all 2D java primitives |
void |
resetStyle()
Resets the current plot settings to default values. |
void |
resetStyleAll()
Resets all plot settings to default values. |
void |
setAntiAlias(boolean setit)
Set antialiasing for the graphics of the current plot |
void |
setAntiAliasAll(boolean setit)
Set antialiasing for the graphics of all plots |
void |
setAutoRange()
Set autorange in X and Y at the same time for the current plot |
void |
setAutoRange(boolean b)
Set autorange in X and Y at the same time |
void |
setAutoRange(int axis,
boolean b)
Sets true or false to use automatic scaling for the current plot. |
void |
setAutoRangeAll()
Set autorange in X and Y at the same time for all plots |
void |
setAutoRangeAll(boolean b)
Set auto-range in X and Y at the same time for all plots |
void |
setAutoRangeAll(int axis,
boolean b)
Sets true or false to use automatic scaling for all plots. |
void |
setAxesColor(java.awt.Color color)
Sets the actual color of the axes of the graph. |
void |
setAxesRatio(double r)
Sets the ratio between X- and Y-axes lengths. |
void |
setAxesRatioUse(boolean b)
Sets whether or not to use a fixed ratio between X- and Y-axes lengths. |
void |
setAxis(int axis,
boolean b)
Sets whether an axis line will be drawn or not. |
void |
setAxisAll(boolean b)
Sets whether all axis lines will be drawn or not. |
void |
setAxisArrow(int type)
Sets axes arrows. |
void |
setAxisMirror(int axis,
boolean b)
Sets whether the mirror of an axis will be drawn or not. |
void |
setAxisPenTicWidth(int penWidth)
Sets the pen width to draw tic axes |
void |
setAxisX()
Sets X-axis (bottom). |
void |
setAxisY()
Sets Y-axis (left). |
void |
setBackgColor(java.awt.Color color)
Sets the actual background color of the entire graph panel. |
void |
setBackgColorForAllGraph(java.awt.Color c)
Sets the background color of all graphs. |
void |
setBackgColorGraph(java.awt.Color c)
Sets the background color of the current graph. |
void |
setBox(boolean b)
Sets whether or not to draw the bounding box around the graph. |
void |
setBoxColor(java.awt.Color c)
Sets the color of the bounding box drawn around a graph. |
void |
setBoxFillColor(java.awt.Color c)
Sets the fill color of the bounding box drawn around a graph. |
void |
setBoxOffset(double f)
Sets the offset of the bounding box drawn around a graph. |
void |
setContour(boolean contour)
Set to a countour style |
void |
setContourBar(boolean bar)
Show or not a bar with color levels |
void |
setContourBins(int binsX,
int binsY)
How many bins used to slice the data in X (and Y) |
void |
setContourGray(boolean gray)
Color style to show contour plot. |
void |
setContourLevels(int levels)
How many color levels shuul be shown (10 default) |
void |
setDataPers(jplot.DataArray data)
Sets the data in the form DataArray data |
void |
setGraph()
Set the graph from JPLot |
void |
setGrid(int axis,
boolean b)
Sets whether or not using grid lines. |
void |
setGridAll(int axis,
boolean b)
Sets or not the grid lines for all plots on the same canvas |
void |
setGridColorAll(java.awt.Color c)
Sets color of the grid lines for all plots on the same canvas |
void |
setGridToFront(boolean b)
Setting the flag to true, this will draw the grid after drawing all the lines and point stuff, hence on the foreground. |
void |
setInnerColor(java.awt.Color c)
Sets the color used to fill the inner triangles. |
void |
setLegend(boolean b)
Sets whether or not to draw the legend. |
void |
setLegendFont(java.awt.Font font)
Sets the actual font of the legend. |
void |
setLegendFont(java.lang.String name)
Set the label font, which is used for axis labels and legend labels. |
void |
setLegendPos(double x,
double y,
java.lang.String system)
Sets the x and y coordinates of the legend. |
void |
setLegendPos(int axis,
double coordinate)
Sets the x or y coordinates (defined relative to the data ranges on the axes) of the legend. |
void |
setLegendPosUse(boolean b)
Sets whether or not to set the legend position in X,Y coordinates as defined by the graph. |
void |
setLegendSpac(double dy)
Sets the vertical spacing, between each line of the legend. |
void |
setLogScale(int axis,
boolean b)
Sets true or false to plot on a log scale. |
void |
setMarginBottom(double bm)
Sets the distance between the bottom-border of the panel and the bottom X-axis. |
void |
setMarginLeft(double lm)
Sets the distance between the left-border of the panel and the left Y-axis. |
void |
setMarginRight(double rm)
Sets the distance between the right-border of the panel and the right Y-axis. |
void |
setMarginTop(double tm)
Sets the distance between the top-border of the panel and the top X-axis. |
void |
setMaxNumberOfSubticsLog(int n)
Sets the maximum number of subtics allowed for log10 scale. |
void |
setMaxValue(int axis,
double max)
Sets the maximum data value displayed on the axis. |
void |
setMinValue(int axis,
double min)
Sets the start-value displayed on the axis. |
void |
setName(java.lang.String name)
Sets a title for the current plot. |
void |
setName(java.lang.String s,
java.awt.Font f)
Sets a title for the current plot with all attributes |
void |
setName(java.lang.String s,
java.awt.Font f,
java.awt.Color c)
Sets a title for the current plot with all attributes |
void |
setNamePos(double x,
double y)
Sets the position for the title of the current plot. |
void |
setNamePos(double x,
double y,
java.lang.String system)
Sets the position for the title of the current plot. |
void |
setNameX(java.lang.String s)
Sets the name for X axis. |
void |
setNameX(java.lang.String s,
java.awt.Font f)
Sets the name for X axis. |
void |
setNameX(java.lang.String s,
java.awt.Font f,
java.awt.Color c)
Set the label for the axis in X |
void |
setNameXpos(double x,
double y)
Sets the position for label on X axis in NDC system. |
void |
setNameXpos(double x,
double y,
java.lang.String system)
Sets the position for label on X axis. |
void |
setNameY(java.lang.String s)
Sets the name for Y axis. |
void |
setNameY(java.lang.String s,
java.awt.Font f)
Sets the name for Y axis. |
void |
setNameY(java.lang.String s,
java.awt.Font f,
java.awt.Color c)
Sets the Title for Y-axis |
void |
setNameYpos(double x,
double y)
Sets the position for label on Y axis in NDC system. |
void |
setNameYpos(double x,
double y,
java.lang.String system)
Sets the position for label on Y axis. |
void |
setNumberOfTics(boolean b)
Says whether the user fixes the number of tics for a specific for all axises. |
void |
setNumberOfTics(int axis,
boolean b)
Says whether the user fixes the number of tics for a specific axis. |
void |
setNumberOfTics(int axis,
int n)
Sets the number of tics for the specified axis. |
void |
setPanelSize(java.awt.Dimension d)
Sets the dimensions of the panel of the graph. |
void |
setPenWidthAxis(double width)
Set pen width to draw axis |
void |
setPrimitivesToFront(boolean b)
Setting the flag to true, this will draw all primitives after drawing all the lines and point stuff, hence on the foreground. |
void |
setRange(double minX,
double maxX,
double minY,
double maxY)
Sets the range for the current plot |
void |
setRange(int axis,
double min,
double max)
Sets the range (min-max) displayed on the axis. |
void |
setRangeAll(double minX,
double maxX,
double minY,
double maxY)
Sets the range for all plots |
void |
setRangeAll(int axis,
double min,
double max)
Sets the range (min-max) displayed on all axises. |
void |
setShadow(boolean b)
Defines whether or not a shadow will be drawn at the panel border. |
void |
setSubTicLength(double length)
Sets the length of the subtics for all axises. |
void |
setSubTicLength(int axis,
double length)
Sets the length of the subtics. |
void |
setSubTicNumber(int axis,
int number)
Sets the number of subtics between tics. |
void |
setTicColor(java.awt.Color color)
Sets the color used by the labels drawn at each tick (for all axises). |
void |
setTicColor(int axis,
java.awt.Color color)
Sets the color used by the labels drawn at each tick. |
void |
setTicFont(java.awt.Font font)
Sets the font used by the labels drawn at each tick (for all axises). |
void |
setTicFont(int axis,
java.awt.Font font)
Sets the font used by the labels drawn at each tick. |
void |
setTicLabels(boolean b)
Sets whether all tic-labels will be written or not. |
void |
setTicLabels(int axis,
boolean b)
Sets whether ticlabels will be written or not. |
void |
setTicLength(double length)
Sets the length of the tics for all axises. |
void |
setTicLength(int axis,
double length)
Sets the length of the tics. |
void |
setTics(boolean b)
Sets whether or not to draw tics (little lines on the axes) for all axis. |
void |
setTics(int axis,
boolean b)
Sets whether or not to draw tics (little lines on the axes). |
void |
setTicsMirror(boolean b)
Sets true or false to draw mirror tics for X and Y |
void |
setTicsMirror(int axis,
boolean b)
Sets true or false to draw mirror tics |
void |
setTicsRotate(int axis,
boolean b)
Defines whether we should rotate tics. |
void |
showAllGraph(boolean vs)
Set the all graphs visible or not |
void |
showGraph(boolean vs)
Set the current graph visible or not |
int |
sizeData()
The data size, i.e. |
int |
toX(double x)
Convert the user coordinate X to the pixel coordinate |
int |
toY(double y)
Convert the user coordinate Y to the pixel coordinate |
hep.aida.ITree |
treeF()
Return TreeFactory associated with the plot |
void |
update()
Just update the current plot selected using cd() method |
void |
update(int n1,
int n2)
Refresh only a particular plot |
void |
updateAll()
Refresh all the plots on the same canvas HPLOT |
void |
updateGraphIfShowing()
Update the graph if it is showing. |
boolean |
useNumberOfTics(int axis)
Returns whether or not to use a fixed number of tics. |
void |
viewHisto(boolean what)
If true, then this suppresses all negative values in Y, i.e. |
void |
visible()
Set the canvas frame visible |
void |
visible(boolean vs)
Set the canvas frame visible or not |
void |
write(java.lang.String file)
Write HPlot file and inserts graphs to the main frame. |
Methods inherited from class jhplot.GHFrame |
---|
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrame |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HPlot(java.lang.String title, int xsize, int ysize, int n1, int n2, boolean set)
title
- Titlexsize
- size in x directionysize
- size in y directionn1
- number of plots/graphs in xn2
- number of plots/graphs in yset
- set or not the graphpublic HPlot(java.lang.String title, int xsize, int ysize, int n1, int n2)
title
- Titlexsize
- size in x directionysize
- size in y directionn1
- number of plots/graphs in xn2
- number of plots/graphs in ypublic HPlot(java.lang.String title, int xs, int ys)
title
- Title for the canvasxs
- size in xys
- size in ypublic HPlot(java.lang.String title, int xs, int ys, boolean set)
title
- Title for the canvasxs
- size in xys
- size in yset
- set or not the graph (boolean)public HPlot(java.lang.String title)
title
- Titlepublic HPlot()
Method Detail |
---|
public void RefreshFrame()
public void read(java.lang.String file)
file
- input filepublic void write(java.lang.String file)
file
- ouput filepublic void visible(boolean vs)
vs
- (boolean) true: visible, false: not visiblepublic void visible()
public void distroy()
public void showGraph(boolean vs)
vs
- (boolean) true: visible, false: not visiblepublic void showAllGraph(boolean vs)
vs
- (boolean) true: visible, false: not visiblepublic void factories()
public hep.aida.IAnalysisFactory analF()
public hep.aida.ITree treeF()
public hep.aida.IFitFactory fitF()
public hep.aida.IFunctionFactory funcF()
public hep.aida.IHistogramFactory histF()
public void setGraph()
public void updateAll()
public void update(int n1, int n2)
n1
- the location of the plot in xn2
- the location of the plot in ypublic void update()
public void updateGraphIfShowing()
public void viewHisto(boolean what)
what
- if true, sets a histogram viewpublic void printGraphSettings()
public void printGraphSettings(java.io.PrintStream out)
out
- input print streampublic void setContour(boolean contour)
contour
- 8 set to true for contour stylepublic void setContourBar(boolean bar)
bar
- true if the bar is shownpublic void setContourLevels(int levels)
levels
- number of color levelspublic void setContourBins(int binsX, int binsY)
binsX
- number of bins in XbinsY
- number of bins in Ypublic void setContourGray(boolean gray)
gray
- set to true to show in black-whitepublic void setAntiAlias(boolean setit)
setit
- true if antialiasing is setpublic boolean getAntiAlias()
public void setAntiAliasAll(boolean setit)
setit
- true if antialiasing is setpublic void setNameX(java.lang.String s, java.awt.Font f, java.awt.Color c)
s
- label titlef
- Fontc
- Colorpublic void setLegendFont(java.awt.Font font)
font
- new font to draw the legend.getLegendFont()
public void setLegendFont(java.lang.String name)
name
- A font name.public void setMarginLeft(double lm)
lm
- the left margin in points.getMarginLeft()
public double getMarginLeft()
public java.awt.Dimension getPanelSize()
public void setPanelSize(java.awt.Dimension d)
d
- Size of the graph panelpublic double getMarginRight()
public void setMarginRight(double rm)
rm
- the right margin in points.public double getPenWidthAxis()
public void setPenWidthAxis(double width)
public double getMarginBottom()
public void setMarginBottom(double bm)
bm
- the bottom margin in points.public double getMarginTop()
public void setMarginTop(double tm)
tm
- the top margin in points.public double getTicLength(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public double getSubTicLength(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void getSubTicNumber(int axis)
axis
- Axispublic void setTicLength(int axis, double length)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.length
- tic length relative to the axis lengthpublic void setSubTicLength(int axis, double length)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.length
- subtic length relative to the axis lengthpublic void setSubTicNumber(int axis, int number)
axis
- Axisnumber
- Number of subtics between ticspublic void setTicLength(double length)
length
- tic length relative to the axis lengthpublic void setSubTicLength(double length)
length
- subtic length relative to the axis lengthpublic boolean getAxesRatioUse()
public void setAxesRatioUse(boolean b)
b
- true if the ratio is fixed and independent of the panel size.public double getAxesRatio()
public void setAxesRatio(double r)
r
- the ratio Y-axisLength/X-axisLengthpublic void setAxisArrow(int type)
type
- 0: no arrows, just lines public int getAxisArrow()
public void setNumberOfTics(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- true if you want to fix the number of tics.public void setNumberOfTics(boolean b)
b
- true if you want to fix the number of tics.public boolean useNumberOfTics(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public int getNumberOfTics(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setNumberOfTics(int axis, int n)
axis
- Defines to which axis this function applies.n
- Number of ticspublic int getMaxNumberOfSubticsLog()
public void setMaxNumberOfSubticsLog(int n)
n
- Maximum allowed number of subtics in log10 scalepublic double getMinValue(int axis)
axis
- Defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setMinValue(int axis, double min)
axis
- Defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.min
- Minimum value on the axispublic double getMaxValue(int axis)
axis
- Defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setMaxValue(int axis, double max)
axis
- Defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.max
- Maximum value on the axispublic java.awt.Font getLegendFont()
public void setLegend(boolean b)
b
- true if you want to show the legend.public void setLegendPos(int axis, double coordinate)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.coordinate
- the x/y coordinate of the legend.public void setLegendPos(double x, double y, java.lang.String system)
x
- the x coordinate of the legend.y
- the y coordinate of the legend.system
- coordinate system (USER or NDC)public boolean getLegendPosUse()
public void setLegendPosUse(boolean b)
b
- true if you want to set the positionpublic double getLegendSpacing()
public void setLegendSpac(double dy)
dy
- vertical spacing for the legend.public double getLegendPos(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setLogScale(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the scaling is logarithmicpublic void setTicsMirror(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the we should draw mirror ticspublic void setTicsMirror(boolean b)
b
- toggle, true if the we should draw mirror ticspublic boolean getTicsMirror(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setTicsRotate(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the we should rotate the ticspublic boolean getTicsRotate(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setShadow(boolean b)
b
- toggle, true if the shadow should be drawn.public boolean getShadow()
public void setGrid(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the the grid should be drawn.public void setGridAll(int axis, boolean b)
axis
- Axis (0 means X, 1 means Y)b
- true is grid is shownpublic void setGridColorAll(java.awt.Color c)
c
- Colorpublic java.awt.Color getGridColor()
public java.awt.Color getInnerColor()
public void setInnerColor(java.awt.Color c)
c
- the color used to fill the shaded triangles.public void setGridToFront(boolean b)
b
- true if the grid will be moved to the frontpublic boolean isGridToFront()
setGridToFront(boolean)
public void setPrimitivesToFront(boolean b)
b
- true if primitives will be moved to the frontpublic boolean isPrimitivesToFront()
public void setBox(boolean b)
b
- true if the filled triangles should be drawn.public void setBoxOffset(double f)
f
- offset in pixels.public float getBoxOffset()
public void setBoxFillColor(java.awt.Color c)
c
- Color for the fillpublic java.awt.Color getBoxFillColor()
public java.awt.Color getBoxColor()
public void setBoxColor(java.awt.Color c)
c
- drawing color.public java.awt.Color getBackgColor()
public void setBackgColor(java.awt.Color color)
color
- New background color.public void setBackgColorGraph(java.awt.Color c)
c
- color.public void setBackgColorForAllGraph(java.awt.Color c)
c
- color.public java.awt.Color getBackgColorGraph()
public jplot.GraphSettings getGraphSettings(int n1, int n2)
n1
- position of graph in xn2
- position of graph in y
public jplot.GraphSettings getGraphSettings()
public jplot.JPlot getJPlot(int n1, int n2)
n1
- position of graph in xn2
- position of graph in y
public jplot.JPlot getJPlot()
public void setNameX(java.lang.String s)
s
- Title for X axis.public void setNameX(java.lang.String s, java.awt.Font f)
s
- Title for X axis.f
- Fontpublic void setNameXpos(double x, double y, java.lang.String system)
x
- X positiony
- Y positionsystem
- coordinate system (USER or NDC)public void setNameYpos(double x, double y, java.lang.String system)
x
- X positiony
- Y positionsystem
- coordinate system (USER or NDC)public void setNameXpos(double x, double y)
x
- X positiony
- Y positionpublic void setNameYpos(double x, double y)
x
- X positiony
- Y positionpublic void setNameY(java.lang.String s)
s
- Title for Y axis.public void setNameY(java.lang.String s, java.awt.Font f)
s
- Title for Y axis.f
- Fontpublic void setNameY(java.lang.String s, java.awt.Font f, java.awt.Color c)
s
- Label namef
- Fontc
- Colorpublic void setName(java.lang.String name)
name
- Titlepublic void setName(java.lang.String s, java.awt.Font f, java.awt.Color c)
s
- Titlef
- Fontc
- Colorpublic void setName(java.lang.String s, java.awt.Font f)
s
- Titlef
- Fontpublic void setNamePos(double x, double y, java.lang.String system)
x
- X positiony
- Y positionsystem
- coordinate system (USER or NDC)public void setNamePos(double x, double y)
x
- X positiony
- Y positionpublic void removeLabels()
public void removeAxes()
public void removeLabel(int i)
i
- index of the label to br removedpublic int numberLabels()
public void removeLabelsAll()
public void removePrimitives()
public void removePrimitives(int i)
i
- index of the primitive to be removedpublic int numberPrimitives()
public void removePrimitivesAll()
public double axisLengthX()
public double axisLengthY()
public int toX(double x)
x
- user coordiinate X for conversionpublic int toY(double y)
y
- user coordiinate Y for conversionpublic void add(HLabel label)
label
- Label to be addedpublic void add(HKey label)
label
- key to be addedpublic void add(HMLabel label)
label
- Label to be addedpublic void draw(HLabel label)
label
- Label to be drawnpublic void draw(HKey label)
label
- a key to be drawnpublic void add(HShape ob)
public void draw(HShape ob)
public java.awt.Color getAxesColor()
public void setAxesColor(java.awt.Color color)
color
- new color to draw the axes.public java.awt.Font getTicFont(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setTicFont(int axis, java.awt.Font font)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.font
- the new fontpublic void setTicFont(java.awt.Font font)
font
- the new fontpublic java.awt.Color getTicColor(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setTicColor(int axis, java.awt.Color color)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.color
- the new colorpublic void setTicColor(java.awt.Color color)
color
- the new color for each axis.public boolean isAxisShown(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setAxis(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the axis should be drawn.public void setAxisX()
public void setAxisY()
public void setAxisAll(boolean b)
b
- toggle, true if the axis should be drawn.public void setAxisPenTicWidth(int penWidth)
penWidth
- pen width to draw the tic axes linespublic int getAxisPenTicWidth()
public boolean isMirrorAxisShown(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setAxisMirror(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the mirror axis should be drawn.public boolean isTicLabelsShown(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void setTicLabels(boolean b)
b
- toggle, true if the axis should be drawn.public void setTicLabels(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the axis should be drawn.public boolean isTicsShown(int axis)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.
public void resetStyle()
public void resetStyleAll()
public void clear()
public void clear(int i1, int i2)
i1
- location of the graph in Xi2
- location of the graph in Ypublic void clearData()
public void clearData(int i1, int i2)
i1
- location of the graph in Xi2
- location of the graph in Ypublic void clearAllData()
public void clearAll()
public void setTics(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the tics should be drawn.public void setTics(boolean b)
b
- toggle, true if the tics should be drawn.public void setRange(int axis, double min, double max)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.min
- minimum value on the axismax
- maximum value on the axispublic void setRangeAll(int axis, double min, double max)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.min
- minimum value on the axismax
- maximum value on the axispublic void setRange(double minX, double maxX, double minY, double maxY)
minX
- Min value in XmaxX
- Max value in XminY
- Min value in YmaxY
- Max value in Ypublic void setRangeAll(double minX, double maxX, double minY, double maxY)
minX
- Min value in XmaxX
- Max value in XminY
- Min value in YmaxY
- Max value in Ypublic void setAutoRange(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the the automatic scaling feature is enabled.public void setAutoRangeAll(int axis, boolean b)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b
- toggle, true if the the automatic scaling feature is enabled.public void setAutoRange(boolean b)
b
- if true, sets autorangepublic void setAutoRangeAll(boolean b)
b
- if true, sets auto-rangepublic void setAutoRange()
public void setAutoRangeAll()
public void drawStatBox(H1D h1)
h1
- histogram H1Dpublic void drawTextBox(java.lang.String[] lines)
lines
- linex of the text to be drawspublic void clearData(int i)
i
- the data set to be removedpublic int sizeData()
public void setDataPers(jplot.DataArray data)
data
- data container of type DataArraypublic void draw(H1D[] h1)
h1
- array of H1D histogramspublic void draw(H1D h1)
h1
- Input H1D histogrampublic int fit(H1D h1, java.lang.String predefFunc, java.lang.String method)
h1
- H1D histogrampredefFunc
- String predefined functionmethod
- String - method for the fit
public void draw(F1D[] f)
f
- array of F1D functionspublic void draw(jplot.DataArray inputDA, int index)
inputDA
- input data containerpublic boolean draw(F1D f1)
f1
- F1D functionreturn
- true if successpublic boolean draw(FND f1)
f1
- FND functionreturn
- true if successpublic boolean draw(F1D f1, boolean startZero)
f1
- F1D functionstartZero
- if true, start from 0 on Y
public boolean draw(FND f1, boolean startZero)
f1
- FND functionstartZero
- if true, start from 0 on Y
public java.util.Vector<jplot.DataArray>[][] getData()
public void close()
public void quit()
public void removeGraph()
public void draw(P1D[] d)
d
- array of P1D data holderspublic void draw(P1D d)
d
- P1D container
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |