public class HPlotter extends JFrame implements ActionListener
Window.TypeComponent.BaselineResizeBehaviorEXIT_ON_CLOSECROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
HPlotter()
Construct a HPlot canvas with a single plot with the size 600x400.
|
HPlotter(String title)
Construct a HPlot canvas with a plot with the size 600x400.
|
HPlotter(String title,
int xs,
int ys)
Construct a HPlot canvas with a single plot.
|
HPlotter(String title,
int xs,
int ys,
boolean set)
Construct a HPlot canvas with a single plot.
|
HPlotter(String title,
int xsize,
int ysize,
int n1,
int n2)
Create HPlot canvas with several plots.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent actionEvent)
Actions
|
boolean |
cd(int cols,
int rows)
Navigate to a selected plot.
|
void |
clear(int i1,
int i2)
Clear the graph characterised by an index in X and Y.
|
void |
close()
Close the canvas (and dispose all components).
|
void |
createRegion(double x,
double y,
double w,
double h)
Create a new plotting region
|
void |
distroy()
Close the frame (as close).
|
void |
doc()
Show online documentation.
|
void |
draw(hep.aida.ref.histogram.Cloud1D c1d)
Draw a cloud using AIDA.
|
void |
draw(hep.aida.ref.histogram.Cloud1D c1d,
hep.aida.IDataStyle datastyle)
Draw Aida cloud with some data style
|
void |
draw(hep.aida.ref.histogram.Cloud1D c1d,
hep.aida.IPlotterStyle style)
Draw Aida cloud with some style.
|
void |
draw(hep.aida.ref.histogram.Cloud2D c2d)
Draw Aida 2D cloud
|
void |
draw(hep.aida.ref.histogram.Cloud2D c2d,
hep.aida.IDataStyle datastyle)
Draw Aida cloud with some data style
|
void |
draw(hep.aida.ref.histogram.Cloud2D c2d,
hep.aida.IPlotterStyle style)
Draw Aida 2D cloud with some style
|
void |
draw(F1D f1d)
Draw a function.
|
void |
draw(H1D h1)
Plot 1D histogram.
|
void |
draw(H1D h1,
hep.aida.IPlotterStyle style)
Plot 1D histogram.
|
void |
draw(H2D h2)
Draw 2D histogram as a density plot.
|
void |
draw(H2D h2,
hep.aida.IPlotterStyle style)
Plot 2D histogram.
|
void |
draw(H2D h2,
String style_str)
Plot 2D histogram.
|
void |
draw(hep.aida.ref.histogram.Histogram1D h1)
Draw Aida histogram with default style
|
void |
draw(hep.aida.ref.histogram.Histogram1D h1,
hep.aida.IDataStyle datastyle)
Draw Aida histogram with some data style
|
void |
draw(hep.aida.ref.histogram.Histogram1D h1,
hep.aida.IPlotterStyle style)
Draw Aida histogram with some plotter style
|
void |
draw(hep.aida.ref.histogram.Histogram2D h2)
Draw 2D histogram as a density plot.
|
void |
draw(hep.aida.ref.histogram.Histogram2D h2,
hep.aida.IDataStyle datastyle)
Draw 2D Aida histogram with some dat style
|
void |
draw(hep.aida.ref.histogram.Histogram2D h2,
hep.aida.IPlotterStyle style)
Draw 2D Aida histogram with some plotter style
|
void |
draw(hep.aida.IDataPointSet p1d)
Plot AIDA data points.
|
void |
draw(hep.aida.IDataPointSet p1d,
hep.aida.IDataStyle datastyle)
Draw Aida data set with some data style
|
void |
draw(hep.aida.IDataPointSet p1d,
hep.aida.IPlotterStyle style)
Draw Aida data set with some style
|
void |
draw(hep.aida.IFunction f1d)
Draw a function using AIDA.
|
void |
draw(hep.aida.IFunction f1d,
hep.aida.IDataStyle datastyle)
Draw Aida function with some data style
|
void |
draw(hep.aida.IFunction f1d,
hep.aida.IPlotterStyle style)
Draw Aida data set with some style
|
void |
draw(P1D p1d)
Plot data points
|
void |
export(String file)
Fast export of the canvas to an image file (depends on the extension,
i.e.
|
Color |
getAxesColor()
Returns the actual color of the axes of the graph.
|
hep.aida.IAxisStyle |
getAxisStyle(int axis)
Return style of axis of the current region
|
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
|
hep.aida.IDataStyle |
getDataStyle()
Get current data style.
|
hep.aida.ILegendBoxStyle |
getLegendStyle()
Get legend box of the current draw area (navigated with the cd() method).
|
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 |
getNtotX()
Get the total number of graphs in X
|
int |
getNtotY()
Get the total number of the graphs in Y
|
List<String> |
getOptAxis(String parameter)
Get options for available parameters
|
List<String> |
getOptRegion(String parameter)
Get options for available parameters of the plotting region.
|
List<String> |
getParAxis()
Get available parameters for axis.
|
List<String> |
getParPlotter()
Get available parameters for this canvas.
|
List<String> |
getParRegion()
Get available parameters for this canvas.
|
List<String> |
getParText()
Get available parameters to draw text
|
hep.aida.IPlotter |
getPlotter()
Return JAS plotter
|
hep.aida.IPlotterStyle |
getPlotterStyle()
Get current plotter style.
|
hep.aida.IPlotterStyle |
getRegionStyle()
Get style of the current plotting region.
|
int |
getSizeX()
Get the width of the main panel which keeps all margins and the central
panel (in pixels)
|
int |
getSizeY()
Get the height of the main panel which keeps all margins and the central
panel (in pixels)
|
hep.aida.IStatisticsBoxStyle |
getStatBoxStyle()
Get statistical box of the current draw area (navigated with the cd()
method).
|
hep.aida.IPlotterStyle |
getStyle()
Get style of the current graph.
|
List<String> |
getTextFonts()
Get available fonts to draw text
|
String |
getTitle()
Return title of this plotter.
|
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 |
setAxesColor(Color c)
Sets the actual color of the axes of the graph.
|
void |
setBackgColor(Color c)
Sets the actual background color for current plot region.
|
void |
setBackgColorGraph(Color c)
Sets the background color of the current graph.
|
void |
setGTitle(String sname)
Set the global title with default attributes.
|
void |
setGTitle(String sname,
Color c)
Set the global title with default attributes.
|
void |
setGTitle(String sname,
Font f,
Color c)
Set global title and its attributes
|
void |
setLegend(boolean set)
Sets whether or not to draw the legend for the current plot.
|
void |
setLegendFont(Font f)
Set legend fonts
|
void |
setLegendPos(double x,
double y)
Set position for the current statistical box
|
void |
setLogScale(int axis,
boolean b)
Sets true or false to plot on a log scale.
|
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 |
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 for the current region.
|
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
|
boolean |
setParAxis(int axis,
String par,
String opt)
Set parameters for the axis using strings
|
boolean |
setParRegion(int axis,
String par,
String opt)
Set parameters for the current region.
|
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 for the current plot.
|
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 |
setStatBox(boolean set)
Set statistical box to the current draw area (navigated with the cd()
method.
|
void |
setStatBoxPos(double x,
double y)
Set position for the current statistical box
|
void |
setStatColor(Color foreg,
Color backg)
Set colors of statistical box.
|
void |
setStatFont(Font f)
Set position for the current statistical box
|
void |
setTicColor(Color c)
Sets the color used by the labels drawn at each tick (for all axes).
|
void |
setTicFont(Font f)
Sets the color used by the labels drawn at each tick (for all axises).
|
void |
setTicStyle(int axis,
Font f,
Color c)
Sets the color used by the labels drawn at each tick.
|
void |
update()
Update the current canvas.
|
void |
updateAll()
Refresh all the plots on the same canvas HPLOT
|
void |
visible()
Set the canvas frame visible
|
void |
visible(boolean vs)
Set the canvas frame visible or not
|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFont, postEventpublic HPlotter(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 HPlotter(String title, int xs, int ys)
title - Title for the canvasxs - size in xys - size in ypublic HPlotter(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 HPlotter(String title)
title - Titlepublic HPlotter()
public void actionPerformed(ActionEvent actionEvent)
actionPerformed in interface ActionListenerpublic void createRegion(double x,
double y,
double w,
double h)
x - X positiony - Y positionw - widthh - heightpublic boolean cd(int cols,
int rows)
cols - Set the location of the current plot in x (horizontal)rows - Set the location of the current plot in y (vertical)return - false if error.public int getCdX()
public int getCdY()
public int getNtotX()
public int getNtotY()
public void visible(boolean vs)
vs - (boolean) true: visible, false: not visiblepublic void visible()
public hep.aida.IPlotter getPlotter()
public void updateAll()
public void update()
public void export(String file)
file - Output file with the proper extension. If no extension, PNG
file is assumed.public void doc()
public String getTitle()
public void close()
public void draw(H1D h1, hep.aida.IPlotterStyle style)
h1 - Input H1D histogramstyle - Plotter style.public void draw(H2D h2, hep.aida.IPlotterStyle style)
h2 - Input H2D histogramstyle - Plotter style.public void draw(H2D h2, String style_str)
h2 - Input H2D histogramstyle - Plotter style as a string: ColorMap, style2D, Boxpublic void draw(H1D h1)
h1 - Input H1D histogrampublic void draw(hep.aida.ref.histogram.Histogram1D h1,
hep.aida.IPlotterStyle style)
h1 - input Aida histogramstyle - stylepublic void draw(hep.aida.ref.histogram.Histogram2D h2,
hep.aida.IPlotterStyle style)
h1 - input Aida histogramstyle - stylepublic void draw(hep.aida.ref.histogram.Histogram1D h1)
h1 - Aida histogramdatastyle - data stylepublic void draw(hep.aida.ref.histogram.Histogram1D h1,
hep.aida.IDataStyle datastyle)
h1 - Aida histogramdatastyle - data stylepublic void draw(hep.aida.ref.histogram.Histogram2D h2,
hep.aida.IDataStyle datastyle)
h2 - Aida histogramdatastyle - data stylepublic void draw(H2D h2)
h2 - Input H2D histogrampublic void draw(hep.aida.ref.histogram.Histogram2D h2)
h2 - Input 2D histogrampublic void draw(hep.aida.IDataPointSet p1d)
p1d - input data points.public hep.aida.IPlotterStyle getPlotterStyle()
public hep.aida.IDataStyle getDataStyle()
public void draw(hep.aida.IDataPointSet p1d,
hep.aida.IPlotterStyle style)
p1d - Aida data setstyle - stylepublic void draw(hep.aida.IDataPointSet p1d,
hep.aida.IDataStyle datastyle)
p1d - datastyle - public void draw(P1D p1d)
p1d - input data points.public void draw(F1D f1d)
f1d - input function;public void draw(hep.aida.IFunction f1d)
f1d - input function;public void draw(hep.aida.IFunction f1d,
hep.aida.IPlotterStyle style)
f1d - function.style - stylepublic void draw(hep.aida.IFunction f1d,
hep.aida.IDataStyle datastyle)
f1d - function.datastyle - public void draw(hep.aida.ref.histogram.Cloud1D c1d)
c1d - input cloud;public void draw(hep.aida.ref.histogram.Cloud1D c1d,
hep.aida.IPlotterStyle style)
c1d - cloud.style - stylepublic void draw(hep.aida.ref.histogram.Cloud1D c1d,
hep.aida.IDataStyle datastyle)
c1d - cloud.datastyle - public void draw(hep.aida.ref.histogram.Cloud2D c2d)
c2d - 2D cloudpublic void draw(hep.aida.ref.histogram.Cloud2D c2d,
hep.aida.IPlotterStyle style)
c2d - cloud.style - stylepublic void draw(hep.aida.ref.histogram.Cloud2D c2d,
hep.aida.IDataStyle datastyle)
c2d - cloud.datastyle - public void setBackgColor(Color c)
c - background color.public void setStatBox(boolean set)
set - true if set.public hep.aida.IStatisticsBoxStyle getStatBoxStyle()
public hep.aida.ILegendBoxStyle getLegendStyle()
public hep.aida.IPlotterStyle getRegionStyle()
public hep.aida.IAxisStyle getAxisStyle(int axis)
axis - 0 for X, 1 for Y, 2 for Zpublic void setStatColor(Color foreg, Color backg)
foreg - foreground color;backg - background color;public void setStatFont(Font f)
x - X positiony - Y positionpublic void setStatBoxPos(double x,
double y)
x - X positiony - Y positionpublic void setLegendPos(double x,
double y)
x - X positiony - Y positionpublic void setLegend(boolean set)
set - true if you want to show the legend.public void setLegendFont(Font f)
x - X positiony - Y positionpublic hep.aida.IPlotterStyle getStyle()
public void setAutoRange()
public void setAutoRange(boolean b)
b - if true, sets autorangepublic 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 boolean setParAxis(int axis,
String par,
String opt)
axis - axis 0=X, 1=Ypar - parameter nameopt - option namepublic boolean setParRegion(int axis,
String par,
String opt)
axis - axis 0=X, 1=Ypar - parameter nameopt - option namepublic List<String> getParAxis()
public List<String> getOptRegion(String parameter)
parameter - input parameterpublic List<String> getOptAxis(String parameter)
parameter - input parameterpublic void setGTitle(String sname, Font f, Color c)
sname - namef - fontc - colorpublic void setGTitle(String sname, Color c)
sname - Titlepublic int getSizeX()
public int getSizeY()
public void setGTitle(String sname)
sname - Titlepublic void distroy()
public void clear(int i1,
int i2)
i1 - location of the graph in Xi2 - location of the graph in Ypublic void setNameX(String s)
s - Title for X axis.public void setBackgColorGraph(Color c)
c - color.public void setLogScale(int axis,
boolean b)
public void setNameX(String s, Font f)
s - Title for X axis.f - Fontpublic void setNameX(String s, Font f, Color c)
s - label titlef - Fontc - Colorpublic double getMinValue(int axis)
public double getMaxValue(int axis)
public List<String> getParPlotter()
public List<String> getParRegion()
public List<String> getTextFonts()
public List<String> getParText()
public 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)
public void setName(String s, Font f, Color c)
s - Titlef - Fontc - Colorpublic void setName(String s, Font f)
s - Titlef - Fontpublic void setTicStyle(int axis,
Font f,
Color c)
public void setTicColor(Color c)
c - the new color for each axis.public void setTicFont(Font f)
c - the new color for each axis.public Color getAxesColor()
public void setAxesColor(Color c)
c - new color to draw the axes.DMelt 2.0 © DataMelt by jWork.ORG