Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLC for polar coordinates: coord_radial() #5334

Merged
merged 31 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9c7d4be
allow alignment of upside-down labels
teunbrand Jun 19, 2023
e698b13
allow alignment of upside-down labels
teunbrand Jun 19, 2023
d33fb9d
Merge branch 'polar_guides' of https://github.com/teunbrand/ggplot2 i…
teunbrand Jun 19, 2023
d5fce8c
Allow `angle` to be a waiver
teunbrand Jun 19, 2023
0f11fd3
First implementation of guide_axis_theta
teunbrand Jun 20, 2023
25bdb66
Add theta/r to available aes
teunbrand Jun 21, 2023
c21ac20
theta guide refuses regular positions
teunbrand Jun 21, 2023
ee65aba
Don't set labels to NULL when guide cannot be found
teunbrand Jun 21, 2023
07a625a
opposite_position helper
teunbrand Jun 22, 2023
baa591a
Fallback for regular positions
teunbrand Jun 22, 2023
3b7159b
Simplify tickmarks
teunbrand Jun 22, 2023
94a2ad3
regular axis sets opposite aesthetic
teunbrand Jun 25, 2023
a32c6cb
accommodate secondary theta scale
teunbrand Jun 25, 2023
b7b9770
First implementation of coord_polar2
teunbrand Jun 25, 2023
36c93ee
Polishes
teunbrand Jun 25, 2023
a1d980b
Write tests
teunbrand Jun 25, 2023
11b6811
Merge branch 'main' into polar_guides
teunbrand Oct 25, 2023
67feb63
update minor ticks implementation
teunbrand Oct 25, 2023
5acb8ab
Rename file
teunbrand Oct 25, 2023
c159487
rename coord_polar2 -> coord_radial
teunbrand Oct 25, 2023
c0c3fa7
unify helpers
teunbrand Oct 25, 2023
be1653a
document
teunbrand Oct 25, 2023
42cfa21
Add theta guide topic
teunbrand Oct 25, 2023
f84f41b
Drop minor ticks example
teunbrand Oct 25, 2023
3c97b98
vectorise `rotate_just()`
teunbrand Oct 25, 2023
d7e9a2d
Don't `Map()` labels
teunbrand Oct 25, 2023
076035b
accept snapshot
teunbrand Oct 25, 2023
0c03a19
Clean up references to CoordPolar2
teunbrand Oct 25, 2023
16653fe
comments and remove return statements
teunbrand Nov 20, 2023
0ae805f
Merge branch 'main' into polar_guides
teunbrand Nov 20, 2023
9ca4b65
add news bullet
teunbrand Nov 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Collate:
'coord-map.R'
'coord-munch.R'
'coord-polar.R'
'coord-polar2.R'
'coord-quickmap.R'
'coord-sf.R'
'coord-transform.R'
Expand Down Expand Up @@ -175,6 +176,7 @@ Collate:
'grouping.R'
'guide-.R'
'guide-axis.R'
'guide-axis-theta.R'
'guide-legend.R'
'guide-bins.R'
'guide-colorbar.R'
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export(CoordFixed)
export(CoordFlip)
export(CoordMap)
export(CoordPolar)
export(CoordPolar2)
export(CoordQuickmap)
export(CoordSf)
export(CoordTrans)
Expand Down Expand Up @@ -411,6 +412,7 @@ export(ggproto_parent)
export(ggsave)
export(ggtitle)
export(guide_axis)
export(guide_axis_theta)
export(guide_bins)
export(guide_colorbar)
export(guide_colorsteps)
Expand Down
3 changes: 2 additions & 1 deletion R/coord-polar.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#' Polar coordinates
#'
#' The polar coordinate system is most commonly used for pie charts, which
#' are a stacked bar chart in polar coordinates.
#' are a stacked bar chart in polar coordinates. `coord_polar2()` has extended
#' options.
#'
#' @param theta variable to map angle to (`x` or `y`)
#' @param start Offset of starting point from 12 o'clock in radians. Offset
Expand Down
Loading