axis_spec {rbokeh} | R Documentation |
Specify axis parameters for an axis.
axis_spec(visible = TRUE, major_label_overrides = NULL, bounds = "auto", level = "overlay", axis_label_standoff = NULL, axis_label_text_align = NULL, axis_label_text_alpha = NULL, axis_label_text_baseline = NULL, axis_label_text_color = NULL, axis_label_text_font = NULL, axis_label_text_font_size = NULL, axis_label_text_font_style = NULL, major_label_orientation = NULL, major_label_standoff = NULL, major_label_text_align = NULL, major_label_text_alpha = NULL, major_label_text_baseline = NULL, major_label_text_color = NULL, major_label_text_font = NULL, major_label_text_font_size = NULL, major_label_text_font_style = NULL, axis_line_alpha = NULL, axis_line_cap = NULL, axis_line_color = NULL, axis_line_dash = NULL, axis_line_dash_offset = NULL, axis_line_join = NULL, axis_line_width = NULL, major_tick_in = NULL, major_tick_line_alpha = NULL, major_tick_line_cap = NULL, major_tick_line_color = NULL, major_tick_line_dash = NULL, major_tick_line_dash_offset = NULL, major_tick_line_join = NULL, major_tick_line_width = NULL, major_tick_out = NULL, minor_tick_in = NULL, minor_tick_line_alpha = NULL, minor_tick_line_cap = NULL, minor_tick_line_color = NULL, minor_tick_line_dash = NULL, minor_tick_line_dash_offset = NULL, minor_tick_line_join = NULL, minor_tick_line_width = NULL, minor_tick_out = NULL, clear = FALSE)
visible |
Is the renderer visible. |
major_label_overrides |
Provide explicit tick label values for specific tick locations that override normal formatting. |
bounds |
Bounds for the rendered axis. If unset, the axis will span the entire plot in the given dimension. |
level |
Specifies the level in which to paint this renderer. |
axis_label_standoff |
The distance in pixels that the axis labels should be offset from the tick labels. |
axis_label_text_align |
The text align of the axis label. |
axis_label_text_alpha |
The text alpha of the axis label. |
axis_label_text_baseline |
The text baseline of the axis label. |
axis_label_text_color |
The text color of the axis label. |
axis_label_text_font |
The text font of the axis label. |
axis_label_text_font_size |
The text font size of the axis label. |
axis_label_text_font_style |
The text font style of the axis label. |
major_label_orientation |
What direction the major label text should be oriented. If a number is supplied, the angle of the text is measured from horizontal. |
major_label_standoff |
The distance in pixels that the major tick labels should be offset from the associated ticks. |
major_label_text_align |
The text align of the major tick labels. |
major_label_text_alpha |
The text alpha of the major tick labels. |
major_label_text_baseline |
The text baseline of the major tick labels. |
major_label_text_color |
The text color of the major tick labels. |
major_label_text_font |
The text font of the major tick labels. |
major_label_text_font_size |
The text font size of the major tick labels. |
major_label_text_font_style |
The text font style of the major tick labels. |
axis_line_alpha |
The line alpha of the axis line. |
axis_line_cap |
The line cap of the axis line. |
axis_line_color |
The line color of the axis line. |
axis_line_dash |
The line dash of the axis line. |
axis_line_dash_offset |
The line dash offset of the axis line. |
axis_line_join |
The line join of the axis line. |
axis_line_width |
The line width of the axis line. |
major_tick_in |
The distance in pixels that major ticks should extend into the main plot area. |
major_tick_line_alpha |
The line alpha of the major ticks. |
major_tick_line_cap |
The line cap of the major ticks. |
major_tick_line_color |
The line color of the major ticks. |
major_tick_line_dash |
The line dash of the major ticks. |
major_tick_line_dash_offset |
The line dash offset of the major ticks. |
major_tick_line_join |
The line join of the major ticks. |
major_tick_line_width |
The line width of the major ticks. |
major_tick_out |
The distance in pixels that major ticks should extend out of the main plot area. |
minor_tick_in |
The distance in pixels that minor ticks should extend into the main plot area. |
minor_tick_line_alpha |
The line alpha of the minor ticks. |
minor_tick_line_cap |
The line cap of the minor ticks. |
minor_tick_line_color |
The line color of the minor ticks. |
minor_tick_line_dash |
The line dash of the minor ticks. |
minor_tick_line_dash_offset |
The line dash offset of the minor ticks. |
minor_tick_line_join |
The line join of the minor ticks. |
minor_tick_line_width |
The line width of the minor ticks. |
minor_tick_out |
The distance in pixels that major ticks should extend out of the main plot area. |
clear |
A logical indicating whether all non-specified parameters should be cleared out of any exising specification in the figure. This can be useful when modifying a previously-defined figure. |
A specification that is used as the axis
argument for x_axis
or y_axis
.
Several of the above attributes can also be set globally using theme_axis
.
figure() %>% ly_points(1:10) %>% x_axis(label = "x axis", axis = axis_spec( axis_label_text_color = "blue", axis_label_standoff = 30, axis_label_text_font_size = "20pt" )) %>% y_axis(label = "y axis", axis = axis_spec( major_label_text_color = "red" )) figure() %>% ly_points(1:10) %>% x_axis(axis = axis_spec(bounds = c(3, 8))) figure() %>% ly_points(1:10) %>% x_axis(axis = axis_spec( major_tick_line_color = "firebrick", major_tick_line_width = 3, minor_tick_line_color = "orange", major_tick_out = 10, minor_tick_in = -3, minor_tick_out = 8 )) %>% y_axis(axis = axis_spec( minor_tick_line_color = NA, major_tick_out = 10, minor_tick_in = -3, minor_tick_out = 8 )) figure() %>% ly_points(1:10) %>% x_axis(axis = axis_spec(major_label_orientation = 45)) %>% y_axis(axis = axis_spec(major_label_orientation = "vertical"))