修訂 | e66d846e811c751a5af1a73b0802ff5fcb7b56e4 (tree) |
---|---|
時間 | 2024-12-19 19:47:37 |
作者 | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I added a new theme which does not require legend positioning.
@@ -1453,6 +1453,40 @@ | ||
1453 | 1453 | |
1454 | 1454 | |
1455 | 1455 | |
1456 | +my_ggplot_theme_new <- function(){ | |
1457 | + theme_bw()+ | |
1458 | + | |
1459 | + theme(## legend.title = element_text(vjust=1,lineheight=1, size=14 ), | |
1460 | + | |
1461 | + legend.title = element_text(vjust = 1,lineheight=1, | |
1462 | + size=14, margin = margin(t = 4.5)), | |
1463 | + legend.spacing.y = grid::unit(3, "pt"), | |
1464 | + ## legend.text.align = 0.5, | |
1465 | + ## legend.text = element_text(hjust=0.5), | |
1466 | + panel.grid.minor = element_blank(), | |
1467 | + plot.title = element_text(lineheight=.8, size=24, face="bold", | |
1468 | + vjust=1), | |
1469 | + legend.text = element_text(vjust=.4, hjust=0.5, lineheight=1,size = 14 ), | |
1470 | + axis.title.x = element_text(size = 20, vjust=1), | |
1471 | + axis.title.y = element_text(size = 20, angle=90, vjust=1), | |
1472 | + axis.text.x = element_text(size=15, colour="black", vjust=1), | |
1473 | + axis.text.y = element_text(size=15, colour="black", hjust=1), | |
1474 | + ## legend.position.inside = legend_coord, | |
1475 | + ## legend.position = legend_coord, | |
1476 | + strip.background = element_rect(colour = 'blue', | |
1477 | + fill = 'white', linewidth = 1, linetype=1), | |
1478 | + strip.text.x = element_text(colour = 'red', angle = 0, | |
1479 | + size = 12, hjust = 0.5, | |
1480 | + vjust = 0.5, face = 'bold'), | |
1481 | + strip.text.y = element_text(colour = 'red', angle = 0, | |
1482 | + size = 12, hjust = 0.5, | |
1483 | + vjust = 0.5, face = 'bold'), | |
1484 | + | |
1485 | + ) | |
1486 | +} | |
1487 | + | |
1488 | + | |
1489 | + | |
1456 | 1490 | |
1457 | 1491 | |
1458 | 1492 | my_ggplot_theme3 <- function(legend_coord){ |