@@ -235,41 +235,6 @@ CoordPolar <- ggproto("CoordPolar", Coord,
235
235
))
236
236
},
237
237
238
- render_fg = function (self , panel_params , theme ) {
239
- if (is.null(panel_params $ theta.major )) {
240
- return (element_render(theme , " panel.border" ))
241
- }
242
-
243
- theta <- theta_rescale(self , panel_params $ theta.major , panel_params )
244
- labels <- panel_params $ theta.labels
245
-
246
- # Combine the two ends of the scale if they are close
247
- theta <- theta [! is.na(theta )]
248
- ends_apart <- (theta [length(theta )] - theta [1 ]) %% (2 * pi )
249
- if (length(theta ) > 0 && ends_apart < 0.05 ) {
250
- n <- length(labels )
251
- if (is.expression(labels )) {
252
- combined <- substitute(paste(a , " /" , b ),
253
- list (a = labels [[1 ]], b = labels [[n ]]))
254
- } else {
255
- combined <- paste(labels [1 ], labels [n ], sep = " /" )
256
- }
257
- labels [[n ]] <- combined
258
- labels <- labels [- 1 ]
259
- theta <- theta [- 1 ]
260
- }
261
-
262
- grobTree(
263
- if (length(labels ) > 0 ) element_render(
264
- theme , " axis.text.x" ,
265
- labels , 0.45 * sin(theta ) + 0.5 , 0.45 * cos(theta ) + 0.5 ,
266
- hjust = 0.5 , vjust = 0.5 ,
267
- default.units = " native"
268
- ),
269
- element_render(theme , " panel.border" )
270
- )
271
- },
272
-
273
238
render_fg = function (self , panel_params , theme ) {
274
239
if (is.null(panel_params $ theta.major )) {
275
240
return (element_render(theme , " panel.border" ))
0 commit comments