35.
stop("invalid '(to - from)/by'")
34.
seq.default(from, to, by)
33.
seq(from, to, by) at
utils-geometry.R#108
32.
seq_robust(from = 0, to = gm * vpm$length + x_adjust, by = h_spacing) at
pattern-geometry-regular_polygon.R#276
31.
get_xy_grid(params, vpm) at
pattern-geometry-crosshatch.R#56
30.
create_crosshatch_via_sf_helper(params, boundary_df, add_top_hatch = FALSE) at
pattern-geometry-stripe.R#39
29.
fn(params, boundary_df, aspect_ratio, x$legend) at
grid-pattern.R#171
28.
makeContent.pattern(x)
27.
makeContent(x)
26.
drawGTree(x)
25.
recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
24.
grid.draw.gTree(x$children[[i]], recording = FALSE)
23.
grid.draw(x$children[[i]], recording = FALSE)
22.
drawGTree(x)
21.
recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
20.
grid.draw.gTree(x$children[[i]], recording = FALSE)
19.
grid.draw(x$children[[i]], recording = FALSE)
18.
drawGTree(x)
17.
recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
16.
grid.draw.gTree(x$children[[i]], recording = FALSE)
15.
grid.draw(x$children[[i]], recording = FALSE)
14.
drawGTree(x)
13.
recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
12.
grid.draw.gTree(x$children[[i]], recording = FALSE)
11.
grid.draw(x$children[[i]], recording = FALSE)
10.
drawGTree(x)
9.
recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
8.
grid.draw.gTree(x$children[[i]], recording = FALSE)
7.
grid.draw(x$children[[i]], recording = FALSE)
6.
drawGTree(x)
5.
recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
4.
grid.draw.gTree(gtable)
3.
grid.draw(gtable)
2.
print.ggplot(x)
1.
(function (x, ...)
UseMethod("print"))(x)
Bug description
I observed that when trying to print a ggplot created with
geom_col_pattern, if the levels of the pattern aesthetic were too long, it would throw an error:Error in seq.default(from, to, by) : invalid '(to - from)/by'Traceback
I played around with some different settings for the variable length, as well as the font size. It seems to be specifically an issue with rendering the plot (as removing the 'print' call can allow the code to run). Interestingly, the issue does NOT occur on my local Mac. I thought maybe it had to do with the graphics backend on my RStudio server instance (ran on Linux), so I switched from AGG to Cairo, but the issue persisted. This may not be an issue with ggpattern itself, as there may be other factors relating to the image rendering that I don't know about, but I have been working on this dockerized RStudio server instance for months and never had a similar issue with other plots.
Minimal, reproducible example
code
Session info
Session info for linux session:
Session info for Mac session: