Angle axes: guide_axis_theta
Mix.install([
{:giggly, path: Path.join(__DIR__, "..")},
{:kino, "~> 0.19"}
])
About this notebook
This notebook follows the examples on ggplot2's reference page for
guide_axis_theta(), in the
order the page gives them. Each example shows ggplot2's code first and then Giggly's. An example
Giggly cannot draw yet keeps its ggplot2 code and names what it is waiting for, so the page is also
a list of what remains.
guide_axis_theta() is the guide coord_radial() draws its theta scale with: the position that
runs as an angle around the circle. Like guide_axis(), it can turn its labels, draw minor ticks
and cap its axis line. Giggly has Giggly.Plot.coord_radial/1, ggplot2's coord_radial() without
options, but no axis guides yet, guide_axis_theta() among them.
The labels' angle
# A plot using coord_radial
p <- ggplot(mtcars, aes(disp, mpg)) +
geom_point() +
coord_radial()
# The `angle` argument can be used to set relative angles
p + guides(theta = guide_axis_theta(angle = 0))
Not in Giggly yet: guide_axis_theta() with its angle option.