public class HPlotJa extends JComponent
HPlot
,
Serialized FormJComponent.AccessibleJComponent
Component.BaselineResizeBehavior
Modifier and Type | Field and Description |
---|---|
static int |
Exponent |
static String |
JAVA_CLASSPATH
The current Java class path.
|
static String |
JAVA_HOME
The directory where Java is installed on the current machine.
|
static String |
JAVA_RUNTIME_VERSION
The current Java runtime version.
|
static String |
JAVA_VERSION
The current Java version.
|
static int |
Key |
static int |
LabelX |
static int |
LabelY |
static String |
OS_ARCH
The architecture of the current operating system.
|
static String |
OS_NAME
The name of the current operating system.
|
static String |
OS_VERSION
The version of the current operating system.
|
static String |
PREFS_FILENAME
The file where user-selected preferences will be stored.
|
static int |
StatBox |
static int |
Title |
static String |
USER_HOME
The current user's home directory.
|
static String |
USER_NAME
The current user.
|
static String |
VERSION
The current version of japlot.jaxodraw.
|
static String |
VERSION_NUMBER
The version number of this release of japlot.jaxodraw.
|
static String |
WEB_SITE
The japlot.jaxodraw web site.
|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
HPlotJa()
Construct a japlot.jaxodraw canvas with a plot with the default
parameters 600 by 400, and 10% space for the global title
|
HPlotJa(String title)
Construct a japlot.jaxodraw canvas with a plot with the default
parameters 600 by 400, and 10% space for the global title
|
HPlotJa(String title,
int xs,
int ys)
Construct a canvas with a single plot region.
|
HPlotJa(String title,
int xsize,
int ysize,
int n1,
int n2)
Create HPlotJa canvas with several pads and axes.
|
HPlotJa(String title,
int xsize,
int ysize,
int n1,
int n2,
boolean setgraph)
Create HPlotJa canvas with several pads.
|
Modifier and Type | Method and Description |
---|---|
void |
add(JaObject ob)
Add an object to the frame.
|
void |
addKey(jplot.DataArray data,
int padx,
int pady) |
void |
addStatBox(int padx,
int pady) |
void |
addToBack(JaObject ob)
Add an object to background.
|
void |
addToFront(JaObject ob)
Add an object to foreground.
|
hep.aida.IAnalysisFactory |
analF()
Return IAnalysisFactory associated with the plot
|
void |
buildPads(int n1,
int n2)
Build axes frames and show them.
|
void |
cd(int cols,
int rows)
Navigate to a selected plot.
|
void |
clearAll()
Clear the canvas from all objects
|
void |
clearAllData()
Clear all data from all graphs.
|
void |
clearData()
Clear the axis frame from the data for the current pad.
|
void |
clearData(int padx,
int pady)
Clear the axis frame from the data
|
void |
close()
Close the canvas (and dispose all components).
|
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(jplot.DataArray inputDA,
String title)
Draw data represented by DataArray on the current pad.
|
void |
draw(F1D f1)
Draw an one-dimensional function on the current pad.
|
void |
draw(F1D[] f)
Draw array of F1D holders
|
void |
draw(F1D f1,
int padx,
int pady)
Draw an one-dimensional function on the current pad.
|
void |
draw(FND f1)
Draw an one-dimensional function on the current pad.
|
void |
draw(FND f1,
int padx,
int pady)
Draw an one-dimensional function on the current pad.
|
void |
draw(H1D h1)
Draw H1D histogram on the current pad.
|
void |
draw(H1D h1,
int padx,
int pady)
Draw H1D histogram on pad X and pad Y
|
void |
draw(H2D h2d)
Draw H2D histogram on the current pad.
|
void |
draw(H2D h2,
int padx,
int pady)
Draw 2D histogram on pads given by X and Y.
|
void |
draw(hep.aida.ref.histogram.Histogram1D h1d)
Draw 1D histogram
|
void |
draw(JaObject jo)
Draw JaObject.
|
void |
draw(P1D p1d)
Draw H2D histogram on the current pad.
|
void |
draw(P1D[] d)
Draw array of P1D holders
|
void |
draw(P1D p1d,
int padx,
int pady)
Draw P1D object on the pad
|
void |
export(String file)
Fast export of the canvas to an image file (depends on the extension,
i.e.
|
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
|
ArrayList |
getArrayList()
Get list of all objects on the frame.
|
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
|
int |
getCdX()
Get location of the graph in the main canvas in X
|
int |
getCdY()
Get location of the graph on the main canvas in Y
|
int |
getContourBinsX()
Number of contour bins in X
|
int |
getContourBinsY()
Number of contour bins in Y
|
int |
getContourLevels()
Number of contour levels
|
static String |
getCurDir()
Returns the current working directory.
|
Vector<jplot.DataArray> |
getData()
Get the vector which keeps all the data
|
JaText |
getGTitle()
Get global title
|
JaAxes |
getJaAxes()
Get the current JaAxes frame
|
double |
getKeyTextSpace()
Get current space between the key symbol and the text for legends
|
JaText |
getLabel(int axis)
Return the current lable
|
JaText[][] |
getLabelsAll(int axis)
Get labels from all pads.
|
ArrayList<JaKey> |
getLegends()
Return all the keys used for data annotation
|
double |
getMarginBottom()
Get size of bottom margin
|
double |
getMarginLeft()
Get margin from left side
|
double |
getMarginRight()
Get margin from right
|
double |
getMarginTop()
Get the size of the top margin
|
double |
getMarginX()
Get margin in X between pads
|
double |
getMarginY()
Get space between any 2 plots in Y
|
int |
getNtotX()
Get the total number of graphs in X
|
int |
getNtotY()
Get the total number of the graphs in Y
|
JaAxes |
getPad()
Get current pad object
|
JaAxes |
getPad(int n1,
int n2)
Get pad characterised by n1 and n2
|
double |
getPadHeight()
Get the height of the current pad in NDC system.
|
double |
getPadPositionX()
Get the position of the current pad in X (NDC coordinate)
|
double |
getPadPositionY()
Get the position of the current pad in Y (in NDC coordinate)
|
double |
getPadWidth()
Get the width of the current pad in NDC system.
|
static void |
getPreferences()
Checks whether preferences have been saved from an earlier session and if
yes, imports them.
|
int |
getSizeX()
get X size
|
int |
getSizeY()
get Y size
|
String[] |
getStatistics(H1D h1)
Get statistics in form of strings
|
String[] |
getStatistics(P1D h1)
Get strings representing the statistics for the given object
|
static int |
getSymbol(jplot.DataArray d) |
hep.aida.IHistogramFactory |
histF()
Return IHistogramFactory associated with the plot
|
boolean |
isContour()
is contour plot?
|
boolean |
isContourBar()
Show a bar indicating levels on contour plot
|
boolean |
isShowStatBox()
Is stat box is shown on the current pad?
|
static void |
main(String[] args)
The main method of japlot.jaxodraw: determines system properties,
preferences and command line arguments, before bringing up the graphical
user interface.
|
void |
removeAxes()
remove X and Y axes, tics, axis labels on the current plot.
|
void |
removeObject(int type,
int padx,
int pady)
Remove a particular object
|
void |
setAntiAlias(boolean setit)
Set antialiasing for the graphics of the current plot
|
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 |
setAxesFrame(int n1,
int n2)
Set axes frames or pads.
|
void |
setAxisAll(boolean show)
Sets whether all axis lines will be drawn or not.
|
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 |
setContour(boolean contour)
Set to a contour style
|
void |
setContourBar(boolean bar)
Show a bar indicating levels on contour plot
|
void |
setContourBins(int nX,
int nY)
Set number of contour bins in X and Y
|
void |
setContourLevels(int levels)
Number of contour levels
|
static void |
setCurDir(String newDir)
Sets the current working directory.
|
void |
setGridAll(int axis,
boolean b)
Sets or not the grid lines for all plots on the same canvas
|
void |
setGTitle(JaText gTitle)
Set the global title
|
void |
setGTitle(String sname)
Set the global title with default attributes.
|
void |
setGTitle(String sname,
Color color)
Set the global title with default attributes.
|
void |
setGTitle(String sname,
Font f)
Sets the global title using black color.
|
void |
setGTitle(String sname,
Font f,
Color c)
Sets the global title
|
void |
setKeyTextSpace(double space)
Set space between the key symbol and the text in a legend.
|
void |
setLabel(int axis,
double x,
double y,
String text)
Set label (or update it) for the current pad selected with the cd(i1,i2) method.
|
void |
setLabel(int axis,
double x,
double y,
String text,
Font f)
Set label (or update it) for the current pad selected with the cd(i1,i2) method.
|
void |
setLabel(int axis,
double x,
double y,
String text,
Font f,
Color c)
Set label (or update it) for the current pad selected with the cd(i1,i2) method.
|
void |
setLabel(int axis,
double x,
double y,
String text,
Font f,
Color c,
String howToSet)
Set label (or update it) for the current pad selected with the cd(i1,i2) method.
|
void |
setLabelShift(int axis,
double shiftX,
double shiftY)
Shift position of a label with respect to the axis by about defined in
NDC (0-1).
|
void |
setLabelX(String label,
int n1,
int n2)
Sets a label for X at the default location
|
void |
setLabelY(String label,
int n1,
int n2)
Set label at the default position
|
void |
setLegendAll(boolean isSet)
Do we need to show legends?
|
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 |
setLegends(ArrayList<JaKey> legends)
Set new list of legends (old legends are removed).
|
void |
setLocationAtCenter(JaText text)
Sets the location of a text object at the center of the canvas
|
void |
setLogScale(int axis,
boolean b)
Sets true or false to plot on a log scale.
|
void |
setMarginBottom(double marginBottom)
Margin from bottom.
|
void |
setMarginLeft(double marginLeft)
Margin from left
|
void |
setMarginRight(double marginRight)
Set margin from right
|
void |
setMarginTop(double marginTop)
Set margin from top in NDC system.
|
void |
setMarginX(double marginX)
Margin in X between pads
|
void |
setMarginY(double marginY)
Margin in Y between pads
|
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 |
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)
Set the label for the axis in Y
|
void |
setPad(double xpos,
double ypos,
double width,
double height)
Set the location and the size of the current pad in NDC coordinate.
|
void |
setPad(int padx,
int pady,
double xpos,
double ypos)
Set the location and the size of the pad in NDC coordinate.
|
void |
setPad(int padx,
int pady,
double xpos,
double ypos,
double width,
double height)
Set the location and the size of the pad in NDC coordinate.
|
void |
setPadLocation(double x,
double y)
Set location of the current pad in NDC You may need to call update.
|
void |
setPadSize(double width,
double height)
Set width and height of the pad in NDC
|
void |
setRange(double minX,
double maxX,
double minY,
double maxY)
Set ranges on X and Y on the current pad.
|
void |
setRangeX(double min,
double max)
Set range on X.
|
void |
setRangeX(double min,
double max,
int padx,
int pady)
Set X range on pad defined by x and y on the canvas.
|
void |
setRangeY(double min,
double max)
Set range on Y on the current pad.
|
void |
setRangeY(double min,
double max,
int padx,
int pady)
Set Y range on pad defined by x and y on the canvas.
|
void |
setShowMirror(int axis,
boolean set)
Set or no a mirror axis
|
void |
setShowStatBox(boolean showStatBox)
Show a box with statistics (only for last plotted object) on the current
pad
|
void |
setStatBox(String[] label,
int n1,
int n2)
Set statistical box.
|
void |
setTicFont(Font font)
Sets the font used by the labels drawn at each tick.
|
void |
setTicksLabels(int axis,
boolean set)
Set tick labels for the current pad
|
void |
showAxis(int axis)
Show a particular axis (no mirror)
|
void |
showEditor()
Show object editor on the left of the canvas.
|
void |
showEditor(boolean show)
Show object editor (or not)
|
void |
showKey(boolean show)
Show or not keys for the current plot
|
hep.aida.ITree |
treeF()
Return TreeFactory associated with the plot
|
void |
update()
Update the canvas by repainting all objects
|
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.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int LabelX
public static final int LabelY
public static final int Title
public static final int StatBox
public static final int Exponent
public static final int Key
public static final String VERSION_NUMBER
public static final String VERSION
public static final String WEB_SITE
public static final String USER_NAME
public static final String USER_HOME
public static final String OS_NAME
public static final String OS_ARCH
public static final String OS_VERSION
public static final String JAVA_VERSION
public static final String JAVA_RUNTIME_VERSION
public static final String JAVA_HOME
public static final String JAVA_CLASSPATH
public static String PREFS_FILENAME
public HPlotJa(String title, int xsize, int ysize, int n1, int n2, boolean setgraph)
title
- Titlexsize
- size in x directionysize
- size in y directionn1
- number of plots/graphs in xn2
- number of plots/graphs in ysetgraph
- true if initials graph with axes should be set Set to false if
you want just empty canvas.public HPlotJa(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 HPlotJa(String title, int xs, int ys)
title
- Title for the canvasxs
- size of canvas in xys
- size of canvas in ypublic HPlotJa()
public HPlotJa(String title)
title
- Titlepublic void setAxesFrame(int n1, int n2)
n1
- number of pads in Xn2
- number of pads in Ypublic void buildPads(int n1, int n2)
n1
- number of pads in Xn2
- number of pads in Ypublic void cd(int cols, int rows)
cols
- Set the location of the current plot in xrows
- Set the location of the current plot in ypublic int getCdX()
public int getNtotX()
public int getNtotY()
public int getCdY()
public JaAxes getJaAxes()
public void setContour(boolean contour)
contour
- set to true for contour stylepublic void setContourBar(boolean bar)
bar
- true if the bar is shownpublic void setContourLevels(int levels)
levels
- number of contour levelspublic int getContourLevels()
levels
- number of contour levelspublic boolean isContourBar()
bar
- true if the bar is shownpublic void setContourBins(int nX, int nY)
number
- of bins in Xnumber
- of bins in Ypublic boolean isContour()
public int getContourBinsX()
public int getContourBinsY()
public void add(JaObject ob)
ob
- input objectpublic void addToBack(JaObject ob)
ob
- input objectpublic void addToFront(JaObject ob)
ob
- input objectpublic void clearAll()
public void clearAllData()
public void clearData(int padx, int pady)
padx
- No of pads in Xpady
- No of pads in Ypublic void setPad(double xpos, double ypos, double width, double height)
padx
- pad ID in Xpady
- pad ID in Yxpos
- pad location in Xypos
- pad location in Ywidth
- pad width in Xhight
- pad height in Ypublic double getPadPositionX()
public double getPadPositionY()
public double getPadWidth()
public double getPadHeight()
public void setPad(int padx, int pady, double xpos, double ypos, double width, double height)
padx
- pad ID in Xpady
- pad ID in Yxpos
- pad location in Xypos
- pad location in Ywidth
- pad width in Xhight
- pad height in Ypublic void setPad(int padx, int pady, double xpos, double ypos)
padx
- pad ID in Xpady
- pad ID in Yxpos
- pad location in Xypos
- pad location in Ypublic void removeObject(int type, int padx, int pady)
type
- type of this objectpadx
- padpady
- padpublic ArrayList getArrayList()
public void clearData()
public void update()
public void close()
public void setLocationAtCenter(JaText text)
text
- input text objectpublic void setAxisAll(boolean show)
show
- toggle, true if the axis should be drawn.public void removeAxes()
public void setTicksLabels(int axis, boolean set)
axis
- axis id (0- X, 1- Y)set
- set to true, if you want to show itpublic void setShowMirror(int axis, boolean set)
axis
- axis id (0- X, 1- Y)set
- set to true, if you want to show itpublic void showAxis(int axis)
axis
- 0 for X, 1 for Ypublic void setGridAll(int axis, boolean b)
axis
- Axis (0 means X, 1 means Y)b
- true is grid is shownpublic void setLabelX(String label, int n1, int n2)
label
- current labeln1
- pad position in X (-1)n2
- pad position in Y (-1)public void setLabel(int axis, double x, double y, String text, Font f, Color c, String howToSet)
axis
- axis. 0 means X, 1 means Yx
- X-position in the NDCy
- Y-position in NDCtext
- textf
- font of this labelc
- Color of this labelhowToSet
- How to set. Use "NDC" (coordinate independent, between 0 and 1) or USER (depends on the plotted coordinates)public void setLabel(int axis, double x, double y, String text, Font f, Color c)
axis
- axis. 0 means X, 1 means Yx
- X-position in the NDCy
- Y-position in NDCtext
- textf
- font of this labelc
- Color of this labelpublic void setLabel(int axis, double x, double y, String text, Font f)
axis
- axis. 0 means X, 1 means Yx
- X-position in the NDCy
- Y-position in NDCtext
- textf
- font of this labelpublic void setLabel(int axis, double x, double y, String text)
axis
- axis. 0 means X, 1 means Yx
- X-position in the NDCy
- Y-position in NDCtext
- textpublic JaText getLabel(int axis)
axis
- if 0 then for X-axis, if 1 then Y-axispublic void setLabelShift(int axis, double shiftX, double shiftY)
axis
- axis. 0 means Y, 1 means YshiftX
- value for the shift in X directionshiftY
- value for the shift in Y directionpublic void setStatBox(String[] label, int n1, int n2)
label
- textn1
- pad ID in X (-1)n2
- pad ID in Y (-1)public void setLabelY(String label, int n1, int n2)
label
- text of the Y labeln1
- pad ID in X (-1)n2
- pad ID in Y (-1)public static void getPreferences()
public int getSizeX()
public int getSizeY()
public static String getCurDir()
public static void setCurDir(String newDir)
newDir
- The new working directory.public void setRangeX(double min, double max)
min
- min value on Xmax
- max value ob Xpublic void setRangeY(double min, double max)
min
- min value on Ymax
- max value on Ypublic void setRange(double minX, double maxX, double minY, double maxY)
minX
- min value on XmaxX
- max value on XminY
- min value on YmaxY
- max value on Ypublic void setRangeX(double min, double max, int padx, int pady)
min
- Min value on Xmax
- Max vallue on Xpadx
- pad in Xpady
- pad in Ypublic void setRangeY(double min, double max, int padx, int pady)
min
- Min value on Ymax
- Max vallue on Ypadx
- pad in Xpady
- pad in Ypublic void setLogScale(int axis, boolean b)
axis
- defines to which axis this function applies (0 if X, 1 if Y).b
- toggle, true if the scaling is logarithmicpublic void setTicFont(Font font)
font
- the new fontpublic void showEditor()
public void showEditor(boolean show)
show
- true then show itpublic void export(String file)
file
- Output file with the proper extension. If no extension, PNG
file is assumed.public JaAxes getPad()
public double getKeyTextSpace()
public void setKeyTextSpace(double space)
space
- space to be set in NDCpublic JaAxes getPad(int n1, int n2)
n1
- location of pad in Xn2
- location of pad in Ypublic void setMarginBottom(double marginBottom)
marginBottom
- public double getMarginBottom()
public void setMarginLeft(double marginLeft)
marginLeft
- public double getMarginLeft()
public void setMarginRight(double marginRight)
marginRight
- public double getMarginRight()
public void setAntiAlias(boolean setit)
setit
- true if antialiasing is setpublic void setLegendFont(Font font)
font
- new font to draw the legend.public ArrayList<JaKey> getLegends()
public void setLegends(ArrayList<JaKey> legends)
new
- legendspublic void setLegendAll(boolean isSet)
isSet
- false, then legends are removed.public void setLegendFont(String name)
name
- A font name.public void setPadLocation(double x, double y)
x
- positiony
- positionpublic void setPadSize(double width, double height)
width
- widthwidth
- heightpublic void setMarginTop(double marginTop)
marginTop
- public double getMarginTop()
public void setMarginX(double marginX)
marginX
- public double getMarginX()
public void setMarginY(double marginY)
marginY
- space in Y between padspublic double getMarginY()
public JaText[][] getLabelsAll(int axis)
axis
- 0 for X, 1 for Ypublic void draw(H1D h1, int padx, int pady)
h1
- input histogrampadx
- No of pads in Xpady
- No of pads in Ypublic void showKey(boolean show)
show
- true if shownpublic void addKey(jplot.DataArray data, int padx, int pady)
public void setShowStatBox(boolean showStatBox)
showStatBox
- public boolean isShowStatBox()
public void addStatBox(int padx, int pady)
public static int getSymbol(jplot.DataArray d)
public void draw(H2D h2, int padx, int pady)
h2
- input histogrampadx
- index of pad in Xpady
- index of pad in Ypublic void setGTitle(JaText gTitle)
gTitle
- object representing global titlepublic void setGTitle(String sname, Font f, Color c)
sname
- Titlef
- Fontc
- Colorpublic void setGTitle(String sname, Font f)
sname
- Title namef
- Fontpublic void setGTitle(String sname)
sname
- Titlepublic void setGTitle(String sname, Color color)
sname
- Titlecolor
- Color of the titlepublic JaText getGTitle()
public void setNameX(String s, Font f, Color c)
s
- label titlef
- Fontc
- Colorpublic void setNameX(String s)
s
- Title for X axis.public void setNameX(String s, Font f)
s
- Title for X axis.f
- Fontpublic void setNameY(String s, Font f, Color c)
s
- label titlef
- Fontc
- Colorpublic void setNameY(String s)
s
- Title for Y axis.public void setBoxFillColor(Color c)
c
- Color for the fillpublic Color getBoxFillColor()
public Color getBoxColor()
public void setBoxColor(Color c)
c
- drawing color.public void setNameY(String s, Font f)
s
- Title for Y axis.f
- Fontpublic void draw(JaObject jo)
jo
- input JaObjectpublic void draw(P1D p1d)
h2d
- input histogrampublic void draw(H2D h2d)
h2d
- input histogrampublic String[] getStatistics(H1D h1)
h1
- input H1Dpublic String[] getStatistics(P1D h1)
h1
- input P1Dpublic void draw(H1D h1)
h1
- input histogrampublic void draw(F1D[] f)
f
- array of F1D functionspublic void draw(hep.aida.ref.histogram.Cloud1D c1d)
c1d
- Input Cloud1Dpublic void draw(hep.aida.ref.histogram.Cloud2D c2d)
c2D
- Input 2D cloudpublic void draw(hep.aida.ref.histogram.Histogram1D h1d)
h1d
- input istogram1Dpublic int fit(H1D h1, String predefFunc, String method)
h1
- H1D histogrampredefFunc
- String predefined functionmethod
- String - method for the fitpublic 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 draw(jplot.DataArray inputDA, String title)
inputDA
- input data containerpublic void draw(F1D f1, int padx, int pady)
f1
- input functionpadx
- pad in Xpady
- pad in Ypublic void draw(FND f1, int padx, int pady)
f1
- input functionpadx
- pad in Xpady
- pad in Ypublic void draw(F1D f1)
f1
- input functionpublic void draw(FND f1)
f1
- input functionpublic void draw(P1D p1d, int padx, int pady)
p1d
- inputpadx
- pad in Xpady
- pad in Ypublic void draw(P1D[] d)
d
- array of P1D data holderspublic Vector<jplot.DataArray> getData()
public 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 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 static void main(String[] args)
args
- The array of command line arguments.public void doc()
jHepWork 3.8 ©