@@ -389,104 +389,6 @@ CoordSf <- ggproto("CoordSf", CoordCartesian,
389
389
ggname(" grill" , do.call(" grobTree" , grobs ))
390
390
},
391
391
392
- # not used, kept around for backup
393
- render_axis_h_alt = function (self , panel_params , theme ) {
394
- graticule <- panel_params $ graticule
395
-
396
- # top axis
397
- if (identical(panel_params $ label_axes $ top , " E" ) ||
398
- identical(panel_params $ label_axes $ top , " N" )) {
399
- # we don't generally know which direction graticules run, so need to consider both
400
- ticks1 <- graticule [graticule $ type == panel_params $ label_axes $ top &
401
- graticule $ y_start > 0.999 , ]
402
- ticks2 <- graticule [graticule $ type == panel_params $ label_axes $ top &
403
- graticule $ y_end > 0.999 , ]
404
- tick_positions <- c(ticks1 $ x_start , ticks2 $ x_end )
405
- tick_labels <- c(ticks1 $ degree_label , ticks2 $ degree_label )
406
-
407
- top <- guide_axis(
408
- tick_positions ,
409
- tick_labels ,
410
- position = " top" ,
411
- theme = theme
412
- )
413
- } else {
414
- top <- zeroGrob()
415
- }
416
-
417
- # bottom axis
418
- if (identical(panel_params $ label_axes $ bottom , " E" ) ||
419
- identical(panel_params $ label_axes $ bottom , " N" )) {
420
- # we don't generally know which direction graticules run, so need to consider both
421
- ticks1 <- graticule [graticule $ type == panel_params $ label_axes $ bottom &
422
- graticule $ y_start < 0.001 , ]
423
- ticks2 <- graticule [graticule $ type == panel_params $ label_axes $ bottom &
424
- graticule $ y_end < 0.001 , ]
425
- tick_positions <- c(ticks1 $ x_start , ticks2 $ x_end )
426
- tick_labels <- c(ticks1 $ degree_label , ticks2 $ degree_label )
427
-
428
- bottom <- guide_axis(
429
- tick_positions ,
430
- tick_labels ,
431
- position = " bottom" ,
432
- theme = theme
433
- )
434
- } else {
435
- bottom <- zeroGrob()
436
- }
437
-
438
- list (top = top , bottom = bottom )
439
- },
440
-
441
- # not used, kept around for backup
442
- render_axis_v_alt = function (self , panel_params , theme ) {
443
- graticule <- panel_params $ graticule
444
-
445
- # left axis
446
- if (identical(panel_params $ label_axes $ left , " E" ) ||
447
- identical(panel_params $ label_axes $ left , " N" )) {
448
- # we don't generally know which direction graticules run, so need to consider both
449
- ticks1 <- graticule [graticule $ type == panel_params $ label_axes $ left &
450
- graticule $ x_start < 0.001 , ]
451
- ticks2 <- graticule [graticule $ type == panel_params $ label_axes $ left &
452
- graticule $ x_end < 0.001 , ]
453
- tick_positions <- c(ticks1 $ y_start , ticks2 $ y_end )
454
- tick_labels <- c(ticks1 $ degree_label , ticks2 $ degree_label )
455
-
456
- left <- guide_axis(
457
- tick_positions ,
458
- tick_labels ,
459
- position = " left" ,
460
- theme = theme
461
- )
462
- } else {
463
- left <- zeroGrob()
464
- }
465
-
466
- # right axis
467
- if (identical(panel_params $ label_axes $ right , " E" ) ||
468
- identical(panel_params $ label_axes $ right , " N" )) {
469
- # we don't generally know which direction graticules run, so need to consider both
470
- ticks1 <- graticule [graticule $ type == panel_params $ label_axes $ right &
471
- graticule $ x_start > 0.999 , ]
472
- ticks2 <- graticule [graticule $ type == panel_params $ label_axes $ right &
473
- graticule $ x_end > 0.999 , ]
474
- tick_positions <- c(ticks1 $ y_start , ticks2 $ y_end )
475
- tick_labels <- c(ticks1 $ degree_label , ticks2 $ degree_label )
476
-
477
- right <- guide_axis(
478
- tick_positions ,
479
- tick_labels ,
480
- position = " right" ,
481
- theme = theme
482
- )
483
- } else {
484
- right <- zeroGrob()
485
- }
486
-
487
- list (left = left , right = right )
488
- },
489
-
490
392
render_axis_h = function (self , panel_params , theme ) {
491
393
graticule <- panel_params $ graticule
492
394
0 commit comments