Skip to content

Commit a0d6b01

Browse files
committed
Avoid new ggplot warnings
1 parent 6595f18 commit a0d6b01

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

R/cpue-map.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,13 @@ plot_cpue_spatial <-
229229
inherit.aes = FALSE, linewidth = 0.2, fill = "grey90", col = "grey70"
230230
) +
231231
coord_equal(xlim = xlim, ylim = ylim) +
232-
theme_pbs() + labs(fill = fill_lab,
233-
colour = fill_lab,
234-
y = en2fr("Northing", translate = french),
235-
x = en2fr("Easting", translate = french))
232+
theme_pbs() +
233+
labs(y = en2fr("Northing", translate = french),
234+
x = en2fr("Easting", translate = french))
235+
236+
if (plot_hexagons) {
237+
g <- g + labs(fill = fill_lab, colour = fill_lab)
238+
}
236239

237240
g <- g + theme(legend.justification = c(1, 1), legend.position = c(1, 1))
238241

0 commit comments

Comments
 (0)