annotation_axis_grob: Grob for Annotation Axis

Description Usage Arguments Value Examples

Description

Grob for Annotation Axis

Usage

1
2
annotation_axis_grob(at = NULL, labels = at, labels_rot = 0, gp = gpar(),
    side = "left", facing = "outside")

Arguments

at

Break values. If it is not specified, it is inferred from data scale in current viewport.

labels

Corresponding labels.

labels_rot

Rotations of labels.

gp

Graphic parameters.

side

side of the axis of the annotation viewport.

facing

Facing of the axis.

Value

A grob object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "left", facing = "outside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(x = unit(0, "npc"), width = grobWidth(gb), just = "right")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "left", facing = "inside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(x = unit(0, "npc"), width = grobWidth(gb), just = "left")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "right", facing = "outside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(x = unit(1, "npc"), width = grobWidth(gb), just = "left")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "right", facing = "inside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(x = unit(1, "npc"), width = grobWidth(gb), just = "right")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "top", facing = "outside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(y = unit(1, "npc"), height = grobHeight(gb), just = "bottom")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 90, 
    side = "top", facing = "outside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(y = unit(1, "npc"), height = grobHeight(gb), just = "bottom")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 45, 
    side = "top", facing = "outside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(y = unit(1, "npc"), height = grobHeight(gb), just = "bottom")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "top", facing = "inside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(y = unit(1, "npc"), height = grobHeight(gb), just = "top")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "bottom", facing = "outside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(y = unit(0, "npc"), height = grobHeight(gb), just = "top")
popViewport()

gb = annotation_axis_grob(at = 1:5, labels = month.name[1:5], labels_rot = 0, 
    side = "bottom", facing = "inside")
grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
grid.draw(gb)
grid.rect(y = unit(0, "npc"), height = grobHeight(gb), just = "bottom")
popViewport()

grid.newpage()
pushViewport(viewport(xscale = c(0, 6), yscale = c(0, 6), width = 0.6, height = 0.6))
gb = annotation_axis_grob(labels_rot = 0, side = "left", facing = "outside")
grid.draw(gb)
grid.rect(x = unit(0, "npc"), width = grobWidth(gb), just = "right")
popViewport()

zhongmicai/complexHeatmap documentation built on May 7, 2019, 6:11 a.m.