public class HPlot2D
extends jhplot.gui.GHFrame
| Constructor and Description |
|---|
HPlot2D()
Construct a HChart canvas with a plot with the default parameters 600 by
400, and 10% space for the global title "Default"
|
HPlot2D(String title)
Construct a HChart canvas with a plot with the default parameters 600 by
400, and 10% space for the global title
|
HPlot2D(String title,
int xs,
int ys)
Construct a HChart canvas with a single plot/graph
|
HPlot2D(String title,
int xs,
int ys,
boolean set)
Construct a HChart canvas with a single plot/graph
|
HPlot2D(String title,
int xs,
int ys,
int n1,
int n2)
Construct a HChart canvas with plots/graphs
|
HPlot2D(String title,
int xsize,
int ysize,
int n1,
int n2,
boolean set)
Create canvas with a several plots
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(HLabel label,
double textHeight)
Add a label to the Canvas in NDC coordinates.
|
void |
clear()
Clear the current pad
|
void |
clearAll()
Clear all pads
|
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.Cloud2D c2d)
Plot cloud 2D.
|
void |
draw(F2D h)
Plot F2D function (x-y) as density plot
|
void |
draw(H2D h)
Draw 2D histogram using a style (see setStyle())
|
void |
draw(hep.aida.ref.histogram.Histogram2D h1d)
Draw 2D histogram
|
void |
draw(P1D h)
Plot P1D data (x-y) as density plot
|
sgtplot.Axis |
getAxis(int axis)
Return axis objects
|
sgtplot.SGLabel |
getAxisTitle(int axis)
Get label title
|
sgtplot.ColorKey |
getColorBar()
Get color bar (key) for the current plot
|
sgtplot.swing.JPlotLayout |
getPlotCanvas()
Get the original canvas
|
int |
getStyle()
Get current style
|
void |
quit()
Quit the canvas (and dispose all components) Note: a memory leak is found -
no time to study it.
|
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 |
setAutoRange()
Set autorange for the current plot
|
void |
setAutoRange(boolean autorange)
Set autorange or not for the current plot
|
void |
setAutoRange(int axis,
boolean autorange)
Set autorange for the current plot
|
void |
setAutoRangeAll()
Set autorange in X and Y at the same time for all plots
|
void |
setAxis(int axis,
sgtplot.Axis axisObject)
Set axis objects
|
void |
setAxis(int axis,
boolean b)
Sets whether an axis line will be drawn or not.
|
void |
setAxisLabelColor(Color color)
Sets the pen color for ticks
|
void |
setAxisLabelFont(Font fnt)
Set fonts for axis Label
|
void |
setAxisLabelHeight(double lhgt)
Set the label height in physical units.
|
void |
setAxisLabelPosition(int axis,
int labp)
Position of label for axis
|
void |
setAxisNumberSubtics(int nstic)
Sets the number of small sub-ticks
|
void |
setAxisPenTicWidth(int penWidth)
Sets the pen width to draw tick axes
|
void |
setAxisTicHeight(double lthgt)
Sets the tick heights in NDC units
|
void |
setAxisTitle(int axis,
sgtplot.SGLabel lab)
Set label for axis
|
void |
setBackground(Color c)
Set background for the plot.
|
void |
setColorBar(sgtplot.ColorKey k)
Set color bar (key) for the current plot
|
void |
setData() |
void |
setGTitle(String title)
Set global title for this plot.
|
void |
setName(String title)
Set global title to the current chart
|
void |
setNameX(String s)
Sets the name for X axis.
|
void |
setNameY(String s)
Sets the name for Y axis.
|
void |
setRange(int axis,
double min,
double max,
int bins)
Sets the range for the current plot and axis.
|
void |
setStyle(int style)
Set style to the current plot.
|
void |
setSubTicLength(int axis,
double length)
Sets the length of the sub-ticks.
|
void |
showTest() |
void |
update()
Update current canvas
|
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.
|
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrameaddComp, componentResized, convertSVG, convertSVG, 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, 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, showBorderspublic HPlot2D(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 HPlot2D(String title, int xs, int ys)
title - Title for the canvasxs - size in xys - size in ypublic HPlot2D(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 HPlot2D(String title, int xs, int ys, int n1, int n2)
title - Title for the canvasxs - size in xys - size in yn1 - number of plots/graphs in xn2 - number of plots/graphs in ypublic HPlot2D(String title)
title - Titlepublic HPlot2D()
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 draw(hep.aida.ref.histogram.Cloud2D c2d)
c2D - Input 2D cloudpublic void draw(hep.aida.ref.histogram.Histogram2D h1d)
h1d - input istogram1Dpublic void draw(H2D h)
h - input historampublic void add(HLabel label, double textHeight)
label - Label to be addedpublic sgtplot.ColorKey getColorBar()
public void setColorBar(sgtplot.ColorKey k)
k - keypublic void update()
public sgtplot.swing.JPlotLayout getPlotCanvas()
public void draw(P1D h)
h - input P1Dpublic void draw(F2D h)
h - input 2d functionpublic void setAutoRange()
public void setAutoRange(boolean autorange)
autorange - true if autorangepublic void setAutoRange(int axis,
boolean autorange)
axis - axis (0=x, 1=y, 2=z)autorange - true if autorangepublic void setRange(int axis,
double min,
double max,
int bins)
axis - apply for axis X (=0) or axis Y (=1) and axis Z (=2) for
contoursmin - Min valuemax - Max valuebins - number of bins between min and maxpublic void setAutoRangeAll()
public void setName(String title)
title - titlepublic void setNameX(String s)
s - Title for X axis.public void setNameY(String s)
s - Title for Y axis.public void setBackground(Color c)
c - background color.public void setGTitle(String title)
setGTitle in class jhplot.gui.GHPaneltitle - plot titlepublic 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 showTest()
public void setData()
public void setStyle(int style)
style - 0 means RASTER style; public sgtplot.Axis getAxis(int axis)
axis - axis =0 for X axis, and =1 for Y axispublic void setAxis(int axis,
sgtplot.Axis axisObject)
axis - axis =0 for X axis, and =1 for Y axisaxis - objectpublic void setAxis(int axis,
boolean b)
public void setAxisLabelFont(Font fnt)
fnt - fontpublic void setAxisLabelHeight(double lhgt)
lhgt - label height.public void setSubTicLength(int axis,
double length)
public void setAxisPenTicWidth(int penWidth)
penWidth - pen width to draw the tick axes linespublic void setAxisLabelColor(Color color)
color - pen color.public void setAxisNumberSubtics(int nstic)
nstic - number of small tickspublic void setAxisTicHeight(double lthgt)
lthgt - height of ticks in NDC unitspublic void setAxisLabelPosition(int axis,
int labp)
axis - axis (0 for x, 1 for y)labp - positionpublic sgtplot.SGLabel getAxisTitle(int axis)
public void setAxisTitle(int axis,
sgtplot.SGLabel lab)
lab - labelpublic int getStyle()
public void doc()
public void clearAll()
public void clear()
public void distroy()
public void close()
public void quit()
DMelt 2.0 © DataMelt by jWork.ORG