org.jlab.groot.ui
Class GraphicsAxis
- java.lang.Object
-
- org.jlab.groot.ui.GraphicsAxis
-
public class GraphicsAxis extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description GraphicsAxis()default
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetAxisDivisions()java.util.List<LatexText>getAxisLabels()java.util.List<java.lang.Double>getAxisMinorTicks()doublegetAxisPosition(double value)returns position along the axis, the dimension of the axis has to be set.java.util.List<java.lang.Double>getAxisTicks()Dimension1DgetDimension()FontPropertiesgetLabelFont()returns properties for the label fonts.doublegetLabelFraction(java.awt.Graphics2D g2d, boolean isVertical)booleangetLog()returns the logarithmic properties of the axisDimension1DgetRange()intgetSize(java.awt.Graphics2D g2d, boolean vertical)FontPropertiesgetTitleFont()returns properties of the title fontstatic voidmain(java.lang.String[] args)main program for testing the axisvoidsetAxisDivisions(int ndiv)GraphicsAxissetDimension(int xmin, int xmax)sets the dimension for the axis for plotting.voidsetLog(boolean logflag)Sets logarithmic scale for the axisGraphicsAxissetRange(double min, double max)Sets the range of the axis, it also updates the axis labels.voidshow()prints string representation of the axis.java.lang.StringtoString()returns string representation of the axis.
-
-
-
Method Detail
-
setDimension
public final GraphicsAxis setDimension(int xmin, int xmax)
sets the dimension for the axis for plotting.- Parameters:
xmin-xmax-- Returns:
-
getDimension
public Dimension1D getDimension()
-
setLog
public void setLog(boolean logflag)
Sets logarithmic scale for the axis- Parameters:
logflag-
-
getLog
public boolean getLog()
returns the logarithmic properties of the axis- Returns:
-
setRange
public final GraphicsAxis setRange(double min, double max)
Sets the range of the axis, it also updates the axis labels.- Parameters:
min-max-- Returns:
-
getRange
public Dimension1D getRange()
-
show
public void show()
prints string representation of the axis.
-
getAxisPosition
public double getAxisPosition(double value)
returns position along the axis, the dimension of the axis has to be set.- Parameters:
value-- Returns:
-
getTitleFont
public FontProperties getTitleFont()
returns properties of the title font- Returns:
-
getLabelFont
public FontProperties getLabelFont()
returns properties for the label fonts.- Returns:
-
getSize
public int getSize(java.awt.Graphics2D g2d, boolean vertical)
-
getAxisDivisions
public int getAxisDivisions()
-
setAxisDivisions
public void setAxisDivisions(int ndiv)
-
getAxisTicks
public java.util.List<java.lang.Double> getAxisTicks()
-
getAxisMinorTicks
public java.util.List<java.lang.Double> getAxisMinorTicks()
-
getLabelFraction
public double getLabelFraction(java.awt.Graphics2D g2d, boolean isVertical)
-
getAxisLabels
public java.util.List<LatexText> getAxisLabels()
-
toString
public java.lang.String toString()
returns string representation of the axis.- Overrides:
toStringin classjava.lang.Object- Returns:
-
main
public static void main(java.lang.String[] args)
main program for testing the axis- Parameters:
args-
-
-
DMelt 3.0 © DataMelt by jWork.ORG