Package org.evoludo.graphics
Class AbstractGraph.GraphStyle
Object
GraphStyle
- Enclosing class:
AbstractGraph<B>
The style features for graphs. This is a collection of settings for line
styles, font sizes, ticks, padding, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
The flag to indicate whether to auto-scale the horizontal axis.boolean
The flag to indicate whether to auto-scale the vertical axis.The font for the axis labels as a CSS string.The backgorund color of the graph.The color of the custom levels.double[]
The array withx
-values to draw custom vertical levels.double[]
The array withy
-values to draw custom horizontal levels.int[]
The dashing pattern for a dashed line.int[]
The dashing pattern for a dotted line.The color to mark end of trajectory.The color of the frame.double
The stroke width of the frame.The color for drawing the graph.The label of the graph (if any).The color of the label of the graph.The font for the graph label as a CSS string.The color of the levels.double
The stroke width of the levels.double
The stroke width of lines on the graph.The color of links on the graph.double
The stroke width of links on the graph.double
The radius of marker points.int
The minimum padding (in pixels) between boundaries of the HTML element and the graph.boolean
The flag to indicate whether tick marks along the horizontal axis are in percent.boolean
The flag to indicate whether tick marks along the vertical axis are in percent.boolean
The flag to indicate whether to show decorations of the frame (ticks and labels).boolean
The flag to indicate whether to show the frame of the graph.boolean
The flag to indicate whether to show the graph label.boolean
The flag to indicate whether to show thex
-axis label.boolean
The flag to indicate whether vertical levels are shown.boolean
The flag to indicate whether to show tick labels along the horizontal axis.boolean
The flag to indicate whether tick labels along the horizontal axis are shown.boolean
The flag to indicate whether to show they
-axis label.boolean
The flag to indicate whether horizontal levels are shown.boolean
The flag to indicate whether to show tick labels along the vertical axis.boolean
The flag to indicate whether tick labels along the vertical axis are shown.int[]
The dashing pattern for a dashed line.The color to mark start of trajectory.int
The tick length in pixels.The font for the axis tick labels label as a CSS string.The color of trajectories.double
Thex
-axis increments.Thex
-axis label of the graph (if any).double
The maximum value of thex
-axis.double
The minimum value of thex
-axis.double
Thex
-axis increments.They
-axis label of the graph (if any).double
The maximum value of they
-axis.double
The minimum value of they
-axis. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
minPadding
public int minPaddingThe minimum padding (in pixels) between boundaries of the HTML element and the graph. -
tickLength
public int tickLengthThe tick length in pixels. -
markerSize
public double markerSizeThe radius of marker points. -
startColor
The color to mark start of trajectory. -
endColor
The color to mark end of trajectory. -
xMin
public double xMinThe minimum value of thex
-axis. -
xMax
public double xMaxThe maximum value of thex
-axis. -
xIncr
public double xIncrThex
-axis increments. -
yMin
public double yMinThe minimum value of they
-axis. -
yMax
public double yMaxThe maximum value of they
-axis. -
yIncr
public double yIncrThex
-axis increments. -
autoscaleX
public boolean autoscaleXThe flag to indicate whether to auto-scale the horizontal axis. -
autoscaleY
public boolean autoscaleYThe flag to indicate whether to auto-scale the vertical axis. -
percentX
public boolean percentXThe flag to indicate whether tick marks along the horizontal axis are in percent. -
percentY
public boolean percentYThe flag to indicate whether tick marks along the vertical axis are in percent. -
label
The label of the graph (if any). -
xLabel
Thex
-axis label of the graph (if any). -
yLabel
They
-axis label of the graph (if any). -
showLabel
public boolean showLabelThe flag to indicate whether to show the graph label. -
showXLabel
public boolean showXLabelThe flag to indicate whether to show thex
-axis label. -
showYLabel
public boolean showYLabelThe flag to indicate whether to show they
-axis label. -
showXTickLabels
public boolean showXTickLabelsThe flag to indicate whether to show tick labels along the horizontal axis. -
showYTickLabels
public boolean showYTickLabelsThe flag to indicate whether to show tick labels along the vertical axis. -
showFrame
public boolean showFrameThe flag to indicate whether to show the frame of the graph. -
showDecoratedFrame
public boolean showDecoratedFrameThe flag to indicate whether to show decorations of the frame (ticks and labels).Note: somewhat hackish... used to force showing axes for 2D histograms (as opposed to plain frame for e.g. lattices)
-
showXLevels
public boolean showXLevelsThe flag to indicate whether vertical levels are shown. -
showYLevels
public boolean showYLevelsThe flag to indicate whether horizontal levels are shown. -
showXTicks
public boolean showXTicksThe flag to indicate whether tick labels along the horizontal axis are shown. -
showYTicks
public boolean showYTicksThe flag to indicate whether tick labels along the vertical axis are shown. -
customXLevels
public double[] customXLevelsThe array withx
-values to draw custom vertical levels. -
customYLevels
public double[] customYLevelsThe array withy
-values to draw custom horizontal levels. -
frameWidth
public double frameWidthThe stroke width of the frame. -
levelWidth
public double levelWidthThe stroke width of the levels. -
lineWidth
public double lineWidthThe stroke width of lines on the graph. -
solidLine
public int[] solidLineThe dashing pattern for a dashed line. -
dashedLine
public int[] dashedLineThe dashing pattern for a dashed line. -
dottedLine
public int[] dottedLineThe dashing pattern for a dotted line. -
linkWidth
public double linkWidthThe stroke width of links on the graph. -
frameColor
The color of the frame. -
levelColor
The color of the levels. -
customLevelColor
The color of the custom levels. -
bgColor
The backgorund color of the graph. -
labelColor
The color of the label of the graph. -
graphColor
The color for drawing the graph. -
linkColor
The color of links on the graph. -
trajColor
The color of trajectories.- See Also:
-
labelFont
The font for the graph label as a CSS string. -
axisLabelFont
The font for the axis labels as a CSS string. -
ticksLabelFont
The font for the axis tick labels label as a CSS string.
-
-
Constructor Details
-
GraphStyle
public GraphStyle()Create a new graph style.
-
-
Method Details
-
setXRange
public void setXRange(int xSteps) Set the range of the horizontal axis toxSteps * xIncr
.- Parameters:
xSteps
- the number of horizontal steps
-
setYRange
public void setYRange(int ySteps) Set the range of the vertical axis toySteps * yIncr
.- Parameters:
ySteps
- the number of vertical steps
-