Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: graphic
See also: setxaxis setyaxis axesoff axeson graxes3d string

Quantlet: graxes
Description: Generates axes with descriptions. Number of options is limited to 19 and unrecognized options are ignored

Usage: axes=graxes(x{, optionname1, optionvalue1} {, optionname2, optionvalue2} {...})
Input:
x n x 2 matrix, axes go from the minimum to the maximum
optionname and optionvalue "origin" 2 x 1 vector or scalar 0-12 specifying the position of the cross (0 means centered), 1.5, 3, 4.5, 6, 7.5, 9, 11.5, 12 correspond to the watch "xticks" vector, position of tickmarks on x-axis "xtcolor" scalar, color of x-tickmarks "xticklen" scalar, length of x-tickmarks "xfmtstr" string for conversion of numbers to text, used for description of x-axis default is "%1.2f" "yticks" vector, position of tickmarks on y-axis "ytcolor" scalar, color of y-tickmarks "yticklen" scalar, length of y-tickmarks "yfmtstr" string for conversion of numbers to text used for description of y-axis default is "%1.2f" "xtext" vector, containing text or numbers description of x-axis "xtextcolor" scalar, color of the text on x-axis "xtextsize" scalar, size of the text on x-axis "xtextpos" scalar, numbers: -1, 0, 3, 6, 9, 12 represent the position of the text relative to the ticks, -1 means no text "ytext" vector containing text or numbers as description of y-axis "ytextcolor" scalar, color of the text on y-axis "ytextsize" scalar, size of the text on y-axis "ytextpos" scalar, numbers: -1, 0, 3, 6, 9, 12 represent the position of the text relative to the ticks, -1 means no text "xcolor" color of the x-axis "ycolor" color of the y-axis
Output:
axes graphical object containing the axes

Example:
library("graphic")
axesoff()
axes=graxes((1|2)~(1|3),"origin",4|2,"xtext",1|7,"ytext","a"|"b"|"c","ytextcolor",5,"ytextpos",3)
di=createdisplay(1,1)
show(di,1,1,axes)

Result:
Display showing a black cross with pink text on the axes
Example:
library("graphic")
axesoff()
axes=graxes((1|2)~(1|3),"origin",1.5,"ytextcolor",1,"xcolor",2,"ytcolor",4,"ycolor",1)
di = createdisplay(1,1)
show(di,1,1,axes)

Result:
Display showing a green x-axis and a blue y-axis with
colored description on the axes.
Example:
library("graphic")
axesoff()
axes=graxes((1|2)~(1|3),"xfmtstr","Value: %6.4f","ytextsize",16,"xcolor",6,"origin",4|2,"xtext",1|7,"ytext","a"|"b"|"c"|"d"|"e","ytextcolor",5,"ytextpos",3,"xtcolor",1,"xticklen",0.25,"yticklen",0)
di=createdisplay(1,1)
show(di,1,1,axes)

Result:
Display showing a colored cross.
Example:
library("graphic")
axesoff()
axes=graxes((1|2)~(1|3),"ytextpos",-1,"xtextpos",-1,"xticklen",0,"yticklen",0)
di=createdisplay(1,1)
show(di,1,1,axes)

Result:
Display showing a simple black cross without any
text on the axes.



Author: Z. Hlavka, 20011017 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006