geom_th_axis | R Documentation |
add the axis and the border add the axis and the border of an annotation plot
geom_th_axis(
name = NULL,
th_data = NULL,
axis_ticks_length = NULL,
axis_color = "black",
axis_label_color = "black",
axis_label_size = 3,
axis_label_nudge_x = 0,
axis_label_nudge_y = 0,
axis_direction = "h",
axis_location = NULL,
border_color = "grey",
border_size = 0.5
)
name |
NULL or a name of heatmap (geom_th_heatmap). |
th_data |
a data frame. To draw a vertical axis, it requires columns
|
axis_ticks_length |
a number to decide the lenght of ticks. |
axis_color |
the color of the axis |
axis_label_color |
the color of axis labels |
axis_label_size |
the size of axis labels |
axis_label_nudge_x |
adjust the location of labels along x-axis |
axis_label_nudge_y |
adjust the location of labels along y-axis |
axis_direction |
either "h" for horizontal or "v" for vertical |
axis_location |
NULL. If |
border_color |
the color of the rectangular border |
border_size |
the size of the border line |
Ruizhu Huang
library(ggplot2)
df_v <- data.frame(axis_minX = rep(1, 10),
axis_maxX = rep(10, 10),
axisY = 1:10,
label = LETTERS[1:10])
ggplot() +
geom_th_axis(th_data = df_v,
axis_direction = "v",
axis_location = "right")
df_h <- data.frame(axisX = 1:10,
axis_minY = rep(1, 10),
axis_maxY = rep(10, 10),
label = LETTERS[1:10])
ggplot() +
geom_th_axis(th_data = df_h, axis_direction = "h")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.