We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a8c586 commit ea72de6Copy full SHA for ea72de6
R/legend.R
@@ -76,7 +76,7 @@ draw_legend <- function(gsplot) {
76
77
default.args <- formals(graphics::legend)
78
79
- if (exists('legend', gsplot)){
+ if ("legend" %in% names(gsplot)){
80
81
# TODO rather than preserve individual pars we should par-scope this draw_legend call
82
# and par scope each run of the for loop
@@ -92,7 +92,7 @@ draw_legend <- function(gsplot) {
92
legend <- appendLegendColumnInfo(legend)
93
legend <- appendLegendPositionConfiguration(legend)
94
# set required legend argument to NA if not exists
95
- if (!exists("legend", legend)) {
+ if (!"legend" %in% names(legend)) {
96
legend$legend <- NA
97
}
98
0 commit comments