All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class figPac.fAxes

java.lang.Object
   |
   +----figPac.fAxes

public class fAxes
extends Object
implements fElement
Draws the x and y axes, puts ticks on the axes, gives the coordinate values corresponding to the ticks and puts labels on the axes. Optionally, the clip path is also set to a rectangle through the ends of the coordinate axes (not yet implemented). Optionally, for the main Figure only (not fSubFigures) and only when the coordinate map is invertible, the limits for the x and y axes are chosen automatically, with xmin being the larger of the x coordinates of the two left hand corners of the Figure and so on. The spacing and positioning of the ticks is chosen automatically to give between 4 and 20 ticks on each axis and to have the coordinate values increase by 1, 2 or 5 in the last decimal place displayed. Axis labels that will overlap the axes or neighbouring coordinate values are skipped. As well the figure margins are adjusted so that the axis data is visible on the screen. When the figure is to be inserted in a TeX file and is to contain TeX labels (precisely, if there exists and entry in the table env with the name "outputLblFile" and value "true") the figure margins are not adjusted and no labels are output. This class does not work well when the coordinate axes are not parallel to the sides of the figure.


Variable Index

 o clipOn
If clipOn is true, the clipping path is set to a rectangle through the ends of the coordinate axes.
 o fig
 o firstXtick
The x coordinate of the first tick on the x axis.
 o firstYtick
The y coordinate of the first tick on the x axis.
 o relXprec
The number of decimal places exhibited for x coordinates when the spacing between successive ticks on the x axis is one and when precision is determined automatically.
 o relYprec
The number of decimal places exhibited for y coordinates when the spacing between successive ticks on the y axis is one and when precision is determined automatically.
 o reMargin
If reMargin is true, and the x and y axes are horizontal and vertical respectively, the margins of the figure are reset to ensure that the various axis labels are visible.
 o xintvl
The spacing between ticks on x axis.
 o xlabel
The label on the x axis.
 o xmax
The largest value of x on the x axis.
 o xmin
The smallest value of x on the x axis.
 o xprec
The number of decimal places exhibited for x coordinates.
 o xticksize
The size in points of ticks on x axis.
 o yintvl
The spacing between ticks on y axis.
 o ylabel
The label on the y axis.
 o ymax
The largest value of y on the x axis.
 o ymin
The smallest value of y on the y axis.
 o yprec
The number of decimal places exhibited for y coordinates.
 o yticksize
The size in points of ticks on y axis.

Constructor Index

 o fAxes()
Creates axes with labels given by empty strings.
 o fAxes(String, String)
Creates axes with labels given by the two arguments.
 o fAxes(String, String, boolean)
Creates axes with labels given by the two arguments and allows clipping to be turned on or off.
 o fAxes(String, String, double, double, double, double)
Creates axes with labels given by the first two arguments and axis limits given by the final four arguments.
 o fAxes(String, String, double, double, double, double, double, double, double, double, int, int)
Creates axes with labels given by the first two arguments, the axis limits determined by the next four arguments, the intervals between ticks on the two axes determined by the next two arguments, the coordinate of the first tick on the two axes determined by the next two arguments and the precision of the tick labels determined by the last two arguments.
 o fAxes(String, String, int, int)
Creates axes with labels given by the first two arguments and relXprec and relYprec given by the last two arguments.

Method Index

 o drawgfx(Figure, Hashtable, V2V)
 o drawps(Figure, Hashtable, V2V)

Variables

 o xmin
 public double xmin
The smallest value of x on the x axis.

 o xmax
 public double xmax
The largest value of x on the x axis.

 o ymin
 public double ymin
The smallest value of y on the y axis.

 o ymax
 public double ymax
The largest value of y on the x axis.

 o xticksize
 public double xticksize
The size in points of ticks on x axis. Defaults to 8.

 o yticksize
 public double yticksize
The size in points of ticks on y axis. Defaults to 8.

 o xintvl
 public double xintvl
The spacing between ticks on x axis.

 o yintvl
 public double yintvl
The spacing between ticks on y axis.

 o firstXtick
 public double firstXtick
The x coordinate of the first tick on the x axis.

 o firstYtick
 public double firstYtick
The y coordinate of the first tick on the x axis.

 o relXprec
 public int relXprec
The number of decimal places exhibited for x coordinates when the spacing between successive ticks on the x axis is one and when precision is determined automatically. Defaults to 0.

 o relYprec
 public int relYprec
The number of decimal places exhibited for y coordinates when the spacing between successive ticks on the y axis is one and when precision is determined automatically. Defaults to 0.

 o xprec
 public int xprec
The number of decimal places exhibited for x coordinates.

 o yprec
 public int yprec
The number of decimal places exhibited for y coordinates.

 o xlabel
 public String xlabel
The label on the x axis. Defaults to the empty string.

 o ylabel
 public String ylabel
The label on the y axis. Defaults to the empty string.

 o clipOn
 public boolean clipOn
If clipOn is true, the clipping path is set to a rectangle through the ends of the coordinate axes. Not yet implemented.

 o reMargin
 public boolean reMargin
If reMargin is true, and the x and y axes are horizontal and vertical respectively, the margins of the figure are reset to ensure that the various axis labels are visible.

 o fig
 public Figure fig

Constructors

 o fAxes
 public fAxes()
Creates axes with labels given by empty strings. If this fAxes is an fElement of the main Figure (rather than an fSubFigure) and if the coordinate map is invertible, the limits for the x and y axes are chosen automatically, with xmin being the larger of the x coordinates of the two left hand corners of the Figure and so on. The spacing and positioning of the ticks is chosen automatically to give between 4 and 20 ticks on each axis and to have the coordinate values increase by 1, 2 or 5 in the last decimal place displayed.

 o fAxes
 public fAxes(String xlabel,
              String ylabel)
Creates axes with labels given by the two arguments. If this fAxes is an fElement of the main Figure (rather than an fSubFigure) and if the coordinate map is invertible, the limits for the x and y axes are chosen automatically, with xmin being the larger of the x coordinates of the two left hand corners of the Figure and so on. The spacing and positioning of the ticks is chosen automatically to give between 4 and 20 ticks on each axis and to have the coordinate values increase by 1, 2 or 5 in the last decimal place displayed.

 o fAxes
 public fAxes(String xlabel,
              String ylabel,
              double xmin,
              double xmax,
              double ymin,
              double ymax)
Creates axes with labels given by the first two arguments and axis limits given by the final four arguments. The spacing and positioning of the ticks is chosen automatically to give between 4 and 20 ticks on each axis and to have the coordinate values increase by 1, 2 or 5 in the last decimal place displayed.

 o fAxes
 public fAxes(String xlabel,
              String ylabel,
              double xmin,
              double xmax,
              double ymin,
              double ymax,
              double xintvl,
              double yintvl,
              double firstXtick,
              double firstYtick,
              int xprec,
              int yprec)
Creates axes with labels given by the first two arguments, the axis limits determined by the next four arguments, the intervals between ticks on the two axes determined by the next two arguments, the coordinate of the first tick on the two axes determined by the next two arguments and the precision of the tick labels determined by the last two arguments.

Parameters:
xlabel - The label on the x axis.
ylabel - The label on the y axis.
xmin - The smallest value of x on the x axis.
xmax - The largest value of x on the x axis.
ymin - The smallest value of y on the y axis.
ymax - The largest value of y on the y axis.
xintvl - The number of x units between ticks on the x axis.
yintvl - The number of y units between ticks on the y axis.
firstXtick - The x coordinate of the first tick on the x axis.
firstYtick - The y coordinate of the first tick on the y axis.
xprec - The number of decimal places for the labels of ticks on the x axis.
yprec - The number of decimal places for the labels of ticks on the y axis.
 o fAxes
 public fAxes(String xlabel,
              String ylabel,
              boolean clipOn)
Creates axes with labels given by the two arguments and allows clipping to be turned on or off.

 o fAxes
 public fAxes(String xlabel,
              String ylabel,
              int relXprec,
              int relYprec)
Creates axes with labels given by the first two arguments and relXprec and relYprec given by the last two arguments.

Methods

 o drawgfx
 public void drawgfx(Figure fig,
                     Hashtable env,
                     V2V usr2pxl)
 o drawps
 public String drawps(Figure fig,
                      Hashtable env,
                      V2V usr2ps)

All Packages  Class Hierarchy  This Package  Previous  Next  Index