public class HPlot extends GHFrame implements Serializable
Constructor and Description |
---|
HPlot()
Construct a HPlot canvas with a single plot with the size 600x400.
|
HPlot(String title)
Construct a HPlot canvas with a plot with the size 600x400.
|
HPlot(String title,
int xs,
int ys)
Construct a HPlot canvas with a single plot.
|
HPlot(String title,
int xs,
int ys,
boolean set)
Construct a HPlot canvas with a single plot.
|
HPlot(String title,
int xsize,
int ysize,
int n1,
int n2)
Create HPlot canvas with several plots.
|
HPlot(String title,
int xsize,
int ysize,
int n1,
int n2,
boolean set)
Create HPlot canvas with several plots.
|
Modifier and Type | Method and Description |
---|---|
void |
add(HKey label)
Add a key to the Canvas.
|
void |
add(HLabel label)
Add a label to the Canvas.
|
void |
add(HLabelEq ob)
Add a LaTeX equation 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 in pixels.
|
double |
axisLengthY()
Length of Y axis in pixels.
|
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 |
clearAllLabels()
Clear all graph labels
|
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 |
clearLabels()
Clear graph labels for the curent graph.
|
void |
clearLabels(int i1,
int i2)
Clear Graph settings including labels.
|
void |
close()
Close the canvas (and dispose all components).
|
void |
distroy()
Remove the canvas frame
|
void |
doc()
Show online documentation.
|
void |
draw(hep.aida.ref.histogram.Cloud1D c1d)
Plot cloud in 1D.
|
void |
draw(hep.aida.ref.histogram.Cloud2D c2d)
Plot cloud 2D
|
void |
draw(DataArray inputDA,
int index)
Draw input data represented by DataArray
|
void |
draw(hep.aida.ref.histogram.DataPointSet ds)
Plot Aida datapointset.
|
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(hep.aida.ref.histogram.Histogram1D h1d)
Draw 1D histogram
|
void |
draw(HKey label)
Draw a key.
|
void |
draw(HLabel label)
Draw a label.
|
void |
draw(HLabelEq ob)
Draw a LaTeX rquation on the Canvas.
|
void |
draw(HMLabel ob)
Draw a multiline 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 |
drawStatBox(H1D h1,
double x,
double y,
String howToSet)
Draw a statistical box (mean, RMS, number of entries) at a specific position.
|
void |
drawStatBox(H1D h1,
int x,
int y)
Draw a statistical box (mean, RMS, number of entries) at a specific position.
|
void |
drawTextBox(String[] lines)
Draw a text box with some information
|
void |
factories()
Create various JAIDA factories: IAnalysisFactory, ITree, IFitFactory,
IFunctionFactory
|
int |
fit(H1D h1,
String predefFunc,
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
|
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 tick axes
|
Color |
getBackgColor()
Returns the actual background color of the entire graph panel.
|
Color |
getBackgColorGraph()
Returns the background color of the current graph.
|
Color |
getBoxColor()
Returns the color used to draw the bounding box.
|
Color |
getBoxFillColor()
Returns the fill-color of the eventual bounding box arround the graph
|
float |
getBoxOffset()
Returns the offset of the bounding box.
|
Vector<DataArray>[][] |
getData()
Get the vector which keeps all the data
|
GraphSettings |
getGraphSettings()
Get graph settings for current plot
|
GraphSettings |
getGraphSettings(int n1,
int n2)
Get graph settings
|
Color |
getGridColor()
Sets the color of the overall grid.
|
Color |
getInnerColor()
Returns the color used to fill the shaded triangles.
|
JPlot |
getJPlot()
Get jplots for each graph for current graph
|
JPlot |
getJPlot(int n1,
int n2)
Get jplots for each graph
|
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 subticks 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 ticks for the specified axis.
|
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 subticks for a given axis
|
Color |
getTicColor(int axis)
Returns the color used by the labels drawn at each tick.
|
Font |
getTicFont(int axis)
Returns the font used by the labels drawn at each tick.
|
double |
getTicLength(int axis)
Returns the length of the ticks.
|
boolean |
getTicsMirror(int axis)
Returns whether or not we should draw ticks on the mirror axis.
|
boolean |
getTicsRotate(int axis)
Returns whether or not we should rotate the ticks.
|
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 ticks (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(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(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, ticks, 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 |
resizePad(double widthScale,
double heightScale)
Resize the current pad.
|
void |
resizePad(int n1,
int n2,
double widthScale,
double heightScale)
Resize the pad given by the inxX and indxY.
|
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 |
setAttResizable(boolean resizable)
Set canvas attributes resizable (line widths, symbols, fonts) or not.
|
void |
setAttResizableAll(boolean resizable)
Set canvas attributes resizable (line widths, symbols, fonts) or not.
|
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(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 tick axes.
|
void |
setAxisX()
Sets X-axis (bottom).
|
void |
setAxisY()
Sets Y-axis (left).
|
void |
setBackgColor(Color color)
Sets the actual background color of the entire graph panel.
|
void |
setBackgColorForAllGraph(Color c)
Sets the background color of all graphs.
|
void |
setBackgColorGraph(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(Color c)
Sets the color of the bounding box drawn around a graph.
|
void |
setBoxFillColor(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 contour 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(DataArray data)
Sets the data in the form DataArray data
|
void |
setGraph()
Set the graph from JPLot
|
void |
setGraphSettings(GraphSettings ggs)
Set a new graph settings for the current plot
|
void |
setGrid(boolean b)
Sets whether or not using grid lines.
|
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(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(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(Font font)
Sets the actual font of the legend.
|
void |
setLegendFont(String name)
Set the label font, which is used for axis labels and legend labels.
|
void |
setLegendPos(double x,
double y,
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 subticks 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(String name)
Sets a title for the current plot.
|
void |
setName(String s,
Font f)
Sets a title for the current plot with all attributes
|
void |
setName(String s,
Font f,
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,
String system)
Sets the position for the title of the current plot.
|
void |
setNameX(String s)
Sets the name for X axis.
|
void |
setNameX(String s,
Font f)
Sets the name for X axis.
|
void |
setNameX(String s,
Font f,
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,
String system)
Sets the position for label on X axis.
|
void |
setNameY(String s)
Sets the name for Y axis.
|
void |
setNameY(String s,
Font f)
Sets the name for Y axis.
|
void |
setNameY(String s,
Font f,
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,
String system)
Sets the position for label on Y axis.
|
void |
setNumberOfTics(int axis,
int n)
Sets the number of ticks for the specified axis.
|
void |
setNumberOfTicsFixed(boolean b)
Says whether the user fixes the number of ticks for a specific for all
axes.
|
void |
setNumberOfTicsFixed(int axis,
boolean b)
Says whether the user fixes the number of ticks for a specific axis.
|
void |
setPanelSize(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 |
setRangeX(double min,
double max)
Sets the range (min-max) displayed on X
|
void |
setRangeY(double min,
double max)
Sets the range (min-max) displayed on Y
|
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 subticks for all axises.
|
void |
setSubTicLength(int axis,
double length)
Sets the length of the subticks.
|
void |
setSubTicNumber(int axis,
int number)
Sets the number of subticks between ticks.
|
void |
setTicColor(Color color)
Sets the color used by the labels drawn at each tick (for all axises).
|
void |
setTicColor(int axis,
Color color)
Sets the color used by the labels drawn at each tick.
|
void |
setTicFont(Font font)
Sets the font used by the labels drawn at each tick (for all axises).
|
void |
setTicFont(int axis,
Font font)
Sets the font used by the labels drawn at each tick.
|
void |
setTicLabels(boolean b)
Sets whether all tick-labels will be written or not.
|
void |
setTicLabels(int axis,
boolean b)
Sets whether tick-labels will be shown or not.
|
void |
setTicLength(double length)
Sets the length of the ticks for all axes.
|
void |
setTicLength(int axis,
double length)
Sets the length of the ticks.
|
void |
setTics(boolean b)
Sets whether or not to draw ticks (little lines on the axes) for all axis.
|
void |
setTics(int axis,
boolean b)
Sets whether or not to draw ticks (little lines on the axes).
|
void |
setTicsMirror(boolean b)
Sets true or false to draw mirror ticks
for X and Y
|
void |
setTicsMirror(int axis,
boolean b)
Sets true or false to draw mirror ticks
|
void |
setTicsRotate(int axis,
boolean b)
Defines whether we should rotate ticks.
|
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 pad.
|
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 ticks.
|
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 |
visible(int posX,
int posY)
Set the canvas frame visible.
|
void |
write(String file)
Write HPlot file and inserts graphs to the main frame.
|
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrame
addComp, componentResized, disableDoubleBuffering, enableDoubleBuffering, export, getCanvasPanel, getMarginBackground, getMarginPanelBottom, getMarginPanelCenter, getMarginPanelLeft, getMarginPanelRight, getMarginPanelTop, getMarginSizeBottom, getMarginSizeLeft, getMarginSizeRight, getMarginSizeTop, getSizeX, getSizeY, getTextBottom, getTextBottomColor, getTextBottomColorBack, getTextBottomFont, getTextLeft, getTextLeftColor, getTextLeftColorBack, getTextLeftFont, getTextPosBottomX, getTextPosBottomY, getTextPosLeftX, getTextPosLeftY, getTextPosRightX, getTextPosRightY, getTextPosTopX, getTextPosTopY, getTextRight, getTextRightColor, getTextRightColorBack, getTextRightFont, getTextRotationBottom, getTextRotationLeft, getTextRotationRight, getTextRotationTop, getTextTop, getTextTopColor, getTextTopColorBack, getTextTopFont, isBorderShown, printGraph, resetMargins, setGTitle, setGTitle, setGTitle, setGTitle, setGTitle, setMarginBackground, setMarginSizeBottom, setMarginSizeLeft, setMarginSizeRight, setMarginSizeTop, setSizePanel, setTextBottom, setTextBottom, setTextBottom, setTextBottom, setTextBottomColorBack, setTextLeft, setTextLeft, setTextLeft, setTextLeft, setTextLeftColorBack, setTextPosBottomX, setTextPosBottomY, setTextPosLeftX, setTextPosLeftY, setTextPosRightX, setTextPosRightY, setTextPosTopX, setTextPosTopY, setTextRight, setTextRight, setTextRight, setTextRight, setTextRightColorBack, setTextRotationBottom, setTextRotationLeft, setTextRotationRight, setTextRotationTop, setTextTop, setTextTop, setTextTop, setTextTopColorBack, showBorders
public HPlot(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(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(String title, int xs, int ys)
title
- Title for the canvasxs
- size in xys
- size in ypublic HPlot(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(String title)
title
- Titlepublic HPlot()
public void refreshFrame()
public void read(String file)
file
- input filepublic void write(String file)
file
- ouput filepublic void visible(boolean vs)
vs
- (boolean) true: visible, false: not visiblepublic void visible()
public void visible(int posX, int posY)
posX
- - the x-coordinate of the new location's top-left corner in the parent's coordinate space;posY
- - he y-coordinate of the new location's top-left corner in the parent's coordinate spacepublic 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 resizePad(double widthScale, double heightScale)
widthScale
- scale factor applied to the width of the current padheightScale
- scale factor applied the height of the current pad.public void resizePad(int n1, int n2, double widthScale, double heightScale)
n1
- the location of the plot in xn2
- the location of the plot in ywidthScale
- scale factor applied to the width of the current padheightScale
- scale factor applied the height of the current pad.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 setAttResizable(boolean resizable)
resizable
- set true if it should be resizable.public void setAttResizableAll(boolean resizable)
resizable
- set true if it should be resizable.public void printGraphSettings(PrintStream out)
out
- input print streampublic void setContour(boolean contour)
contour
- set to true for a 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(String s, Font f, Color c)
s
- label titlef
- Fontc
- Colorpublic void setLegendFont(Font font)
font
- new font to draw the legend.getLegendFont()
public void setLegendFont(String name)
name
- A font name.public void setMarginLeft(double lm)
lm
- the left margin in points.getMarginLeft()
public double getMarginLeft()
public Dimension getPanelSize()
public void setPanelSize(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)
public double getSubTicLength(int axis)
public void getSubTicNumber(int axis)
axis
- Axis value (0 or 1)public void setTicLength(int axis, double length)
public void setSubTicLength(int axis, double length)
public void setSubTicNumber(int axis, int number)
axis
- Axis (0 for X, 1 for Y)number
- Number of subticks between tickspublic void setTicLength(double length)
length
- tick length relative to the axis lengthpublic void setSubTicLength(double length)
length
- subtick 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 setNumberOfTicsFixed(int axis, boolean b)
public void setNumberOfTicsFixed(boolean b)
b
- true if you want to fix the number of ticks.public boolean useNumberOfTics(int axis)
public int getNumberOfTics(int axis)
public void setNumberOfTics(int axis, int n)
axis
- Defines to which axis this function applies. Use 0 for X and 1 for Y.n
- Number of tickspublic int getMaxNumberOfSubticsLog()
public void setMaxNumberOfSubticsLog(int n)
n
- Maximum allowed number of subticks in log10 scalepublic double getMinValue(int axis)
public void setMinValue(int axis, double min)
public double getMaxValue(int axis)
public void setMaxValue(int axis, double max)
public Font getLegendFont()
public void setLegend(boolean b)
b
- true if you want to show the legend.public void setLegendPos(int axis, double coordinate)
public void setLegendPos(double x, double y, 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)
public void setLogScale(int axis, boolean b)
public void setTicsMirror(int axis, boolean b)
public void setTicsMirror(boolean b)
b
- toggle, true if the we should draw mirror tickspublic boolean getTicsMirror(int axis)
public void setTicsRotate(int axis, boolean b)
public boolean getTicsRotate(int 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)
public void setGrid(boolean b)
b
- true if shownpublic void setGridAll(int axis, boolean b)
axis
- Axis (0 means X, 1 means Y)b
- true is grid is shownpublic void setGridColorAll(Color c)
c
- Colorpublic Color getGridColor()
public Color getInnerColor()
public void setInnerColor(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(Color c)
c
- Color for the fillpublic Color getBoxFillColor()
public Color getBoxColor()
public void setBoxColor(Color c)
c
- drawing color.public Color getBackgColor()
public void setBackgColor(Color color)
color
- New background color.public void setBackgColorGraph(Color c)
c
- color.public void setBackgColorForAllGraph(Color c)
c
- color.public Color getBackgColorGraph()
public GraphSettings getGraphSettings(int n1, int n2)
n1
- position of graph in xn2
- position of graph in ypublic void setGraphSettings(GraphSettings ggs)
ggs
- new graph settingspublic GraphSettings getGraphSettings()
public JPlot getJPlot(int n1, int n2)
n1
- position of graph in xn2
- position of graph in ypublic JPlot getJPlot()
public void setNameX(String s)
s
- Title for X axis.public void setNameX(String s, Font f)
s
- Title for X axis.f
- Fontpublic void setNameXpos(double x, double y, String system)
x
- X positiony
- Y positionsystem
- coordinate system (USER or NDC)public void setNameYpos(double x, double y, 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(String s)
s
- Title for Y axis.public void setNameY(String s, Font f)
s
- Title for Y axis.f
- Fontpublic void setNameY(String s, Font f, Color c)
s
- Label namef
- Fontc
- Colorpublic void setName(String name)
name
- Titlepublic void setName(String s, Font f, Color c)
s
- Titlef
- Fontc
- Colorpublic void setName(String s, Font f)
s
- Titlef
- Fontpublic void setNamePos(double x, double y, 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(HLabelEq ob)
public void draw(HLabelEq ob)
public void add(HShape ob)
public void draw(HShape ob)
public void draw(HMLabel ob)
public Color getAxesColor()
public void setAxesColor(Color color)
color
- new color to draw the axes.public Font getTicFont(int axis)
public void setTicFont(int axis, Font font)
public void setTicFont(Font font)
font
- the new fontpublic Color getTicColor(int axis)
public void setTicColor(int axis, Color color)
public void setTicColor(Color color)
color
- the new color for each axis.public boolean isAxisShown(int axis)
public void setAxis(int axis, boolean b)
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 tick axes linespublic int getAxisPenTicWidth()
public boolean isMirrorAxisShown(int axis)
public void setAxisMirror(int axis, boolean b)
public boolean isTicLabelsShown(int axis)
public void setTicLabels(boolean b)
b
- toggle, true if the axis should be drawn.public void setTicLabels(int axis, boolean b)
public boolean isTicsShown(int 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 clearLabels()
public void clearLabels(int i1, int i2)
i1
- location of the graph in Xi2
- location of the graph in Ypublic void clearData(int i1, int i2)
i1
- location of the graph in Xi2
- location of the graph in Ypublic void clearAllData()
public void clearAllLabels()
public void clearAll()
public void setTics(int axis, boolean b)
public void setTics(boolean b)
b
- toggle, true if the ticks should be drawn.public void setRange(int axis, double min, double max)
public void setRangeX(double min, double max)
min
- minimum value on the axismax
- maximum value on the axispublic void setRangeY(double min, double max)
min
- minimum value on the axismax
- maximum value on the axispublic void setRangeAll(int axis, double min, double max)
public 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)
public void setAutoRangeAll(int axis, boolean b)
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 drawStatBox(H1D h1, int x, int y)
h1
- histogram H1Dx
- position in Xy
- position in Ypublic void drawStatBox(H1D h1, double x, double y, String howToSet)
h1
- histogram H1Dx
- position in Xy
- position in YhowToSet
- use "NDC" or "USER" (coordinate dependent)public void drawTextBox(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(DataArray data)
data
- data container of type DataArraypublic void draw(H1D[] h1)
h1
- array of H1D histogramspublic void draw(hep.aida.ref.histogram.Cloud1D c1d)
c1d
- Input Cloud1Dpublic void draw(hep.aida.ref.histogram.DataPointSet ds)
ds
- Input dataPoint setpublic void draw(hep.aida.ref.histogram.Cloud2D c2d)
c2D
- Input 2D cloudpublic void draw(hep.aida.ref.histogram.Histogram1D h1d)
h1d
- input istogram1Dpublic void draw(H1D h1)
h1
- Input H1D histogrampublic int fit(H1D h1, String predefFunc, String method)
h1
- H1D histogrampredefFunc
- String predefined functionmethod
- String - method for the fitpublic void draw(F1D[] f)
f
- array of F1D functionspublic void draw(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 Ypublic boolean draw(FND f1, boolean startZero)
f1
- FND functionstartZero
- if true, start from 0 on Ypublic Vector<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 containerpublic void doc()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics