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.
-
clipOn
- If clipOn is true, the clipping path is set to a rectangle through the ends of the coordinate axes.
-
fig
-
-
firstXtick
- The x coordinate of the first tick on the x axis.
-
firstYtick
- The y coordinate of the first tick on the x axis.
-
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.
-
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.
-
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.
-
xintvl
- The spacing between ticks on x axis.
-
xlabel
- The label on the x axis.
-
xmax
- The largest value of x on the x axis.
-
xmin
- The smallest value of x on the x axis.
-
xprec
- The number of decimal places exhibited for x coordinates.
-
xticksize
- The size in points of ticks on x axis.
-
yintvl
- The spacing between ticks on y axis.
-
ylabel
- The label on the y axis.
-
ymax
- The largest value of y on the x axis.
-
ymin
- The smallest value of y on the y axis.
-
yprec
- The number of decimal places exhibited for y coordinates.
-
yticksize
- The size in points of ticks on y axis.
-
fAxes()
- Creates axes with labels given by empty strings.
-
fAxes(String, String)
- Creates axes with labels given by the two arguments.
-
fAxes(String, String, boolean)
- Creates axes with labels given by the two arguments and allows clipping
to be turned on or off.
-
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.
-
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.
-
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.
-
drawgfx(Figure, Hashtable, V2V)
-
-
drawps(Figure, Hashtable, V2V)
-
xmin
public double xmin
- The smallest value of x on the x axis.
xmax
public double xmax
- The largest value of x on the x axis.
ymin
public double ymin
- The smallest value of y on the y axis.
ymax
public double ymax
- The largest value of y on the x axis.
xticksize
public double xticksize
- The size in points of ticks on x axis. Defaults to 8.
yticksize
public double yticksize
- The size in points of ticks on y axis. Defaults to 8.
xintvl
public double xintvl
- The spacing between ticks on x axis.
yintvl
public double yintvl
- The spacing between ticks on y axis.
firstXtick
public double firstXtick
- The x coordinate of the first tick on the x axis.
firstYtick
public double firstYtick
- The y coordinate of the first tick on the x axis.
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.
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.
xprec
public int xprec
- The number of decimal places exhibited for x coordinates.
yprec
public int yprec
- The number of decimal places exhibited for y coordinates.
xlabel
public String xlabel
- The label on the x axis. Defaults to the empty string.
ylabel
public String ylabel
- The label on the y axis. Defaults to the empty string.
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.
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.
fig
public Figure fig
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.
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.
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.
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.
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.
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.
drawgfx
public void drawgfx(Figure fig,
Hashtable env,
V2V usr2pxl)
drawps
public String drawps(Figure fig,
Hashtable env,
V2V usr2ps)
All Packages Class Hierarchy This Package Previous Next Index