degrees_to_adj | R Documentation |
Degrees to text adjustment
degrees_to_adj(
degrees,
top = 90,
clockwise = FALSE,
expand = 0,
bias_side = 3,
bias_height = 1,
plot_ranges = FALSE,
...
)
degrees |
|
top |
|
clockwise |
|
expand |
|
... |
additional arguments are ignored |
Utility function to define adj
values suitable
for text plotting, which arranges text relative
to the angle in degrees.
Other venndir spatial:
diff_degrees()
,
display_angles()
,
mean_degree_arc()
,
mean_degrees()
,
rescale_coordinates()
,
spread_degrees()
degrees <- seq(from=1, to=360, by=33);
adjdf <- degrees_to_adj(degrees);
x <- cos(jamba::deg2rad(degrees));
y <- sin(jamba::deg2rad(degrees));
plot(x, y,
pch=20, asp=1,
xlim=c(-1.3, 1.3),
ylim=c(-1.3, 1.3));
for (i in seq_along(degrees)) {
text(labels=i,
x=x[i], y=y[i],
adj=unlist(adjdf[i,]))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.