Skip to content

Commit ff9e623

Browse files
committed
Add comment describing the reason for the slightly weird reassembly of widths and heights
1 parent 1fc1d5e commit ff9e623

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/plot-build.r

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ ggplot_gtable.ggplot_built <- function(data) {
291291
b = nrow(plot_table), l = 1,
292292
r = ncol(plot_table), clip = "off")
293293
} else {
294+
# Widths and heights are reassembled below instead of assigning into them
295+
# in order to avoid bug in grid 3.2 and below.
294296
if (tag_pos == "topleft") {
295297
plot_table$widths <- unit.c(tag_width, plot_table$widths[-1])
296298
plot_table$heights <- unit.c(tag_height, plot_table$heights[-1])

0 commit comments

Comments
 (0)