You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using coord_radial we can move the r axis (aka y axis) inside using r_axis_inside = T. However, when r_axis_inside = T the position defaults to 0 degrees when plotting a full circle and this is confusing the r axis extends into the first value of the theta axis.
I would like to be able to control the position/angle of the r axis when it is inside the plot. For example below I would like to have the r axis at 45 degrees so it is not to be confused with the theta axis.
library(ggplot2)
# Generate data for each combination of circle (360 deg) and radius (0 to 90)data<- expand.grid(
angle= seq(0, 359, by=1),
radius= seq(0, 90, by=1),
value=0.5
)
# Create the circular plot
ggplot(data, aes(x=angle, y=radius)) +
geom_tile(alpha=0.2) +
coord_radial(
r_axis_inside=T,
expand=F
) +
scale_x_continuous(breaks= seq(0, 270, 90)) +
labs(title="Circular Plot",
x="Angle (degrees)",
y="Radius")
I can understand why this is useful, but by extension we could also ask why we don't allow e.g. coord_cartesian() to place axes inside the panel at specified positions.
Also looking for this feature! Being able to place the r-axis inside gives a much better view on the scale, but sometimes it overlaps with your data (see example below). If I was able to customize the angle it would be much easier to prevent overlapping
When using coord_radial we can move the
r axis
(aka y axis) inside usingr_axis_inside = T
. However, whenr_axis_inside = T
the position defaults to 0 degrees when plotting a full circle and this is confusing ther axis
extends into the first value of the theta axis.I would like to be able to control the position/angle of the
r axis
when it is inside the plot. For example below I would like to have ther axis
at 45 degrees so it is not to be confused with the theta axis.Created on 2024-03-25 with reprex v2.1.0
Here is roughly what I am after:
The text was updated successfully, but these errors were encountered: