diff --git a/.gitignore b/.gitignore
index c7bf409..fa1da1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ pkgdown
/Meta/
/revdep/
/tmp/
+/.claude/
diff --git a/DESCRIPTION b/DESCRIPTION
index 10ce8c5..8fbb554 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Package: ggpattern
Type: Package
Title: 'ggplot2' Pattern Geoms
-Version: 1.3.1-0
+Version: 1.3.2-1
Authors@R: c(person("Mike", "FC", role = "aut"),
person("Trevor L.", "Davis", role = c("aut", "cre"),
email = "trevor.l.davis@gmail.com",
@@ -13,7 +13,6 @@ BugReports: https://github.com/trevorld/ggpattern/issues
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
-RoxygenNote: 7.3.3
Depends:
R (>= 4.1)
Imports:
@@ -21,7 +20,7 @@ Imports:
ggplot2 (>= 4.0.2),
glue,
grid,
- gridpattern (>= 1.2.2),
+ gridpattern (>= 1.4.2),
lifecycle,
rlang (>= 1.1.3),
scales,
@@ -85,3 +84,4 @@ Collate:
'scale-pattern.R'
'zxx.R'
'zzz.R'
+Config/roxygen2/version: 8.0.0
diff --git a/NEWS.md b/NEWS.md
index 5520174..cf363b7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,8 +1,14 @@
+# ggpattern 1.3.2
+
+## Bug fixes and minor improvements
+
+* Bumps required version of `{gridpattern}` to v1.4.2 which should fix a bug with patterns sometimes not showing up in the legend with larger `pattern_key_scale_factor` values (#86).
+
# ggpattern 1.3.1
## Breaking changes
-* Now requires `ggplot2` (>= 4.0.2) and thus `R` (>= 4.1).
+* Now requires `{ggplot2}` (>= 4.0.2) and thus `R` (>= 4.1).
* All geom default aesthetics now use `from_theme()` for colours, line widths, and line types.
These changes were made to the `{ggplot2}` analogues in `{ggplot2}` 4.0.0.
* Turned off fallback for `size` to `linewidth` translation in `geom_bar_pattern()`/`geom_col_pattern()`.
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 2b8cdfb..92cdf22 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -4,6 +4,7 @@ development:
mode: auto
template:
bootstrap: 5
+llm-docs: false
reference:
- title: "ggpattern package"
desc: "High level package description"
diff --git a/man/geom-docs.Rd b/man/geom-docs.Rd
index 3e1390b..858c575 100644
--- a/man/geom-docs.Rd
+++ b/man/geom-docs.Rd
@@ -507,8 +507,8 @@ Not all arguments apply to all patterns.
\item{\strong{\code{pattern_colour}}}{ Colour used for strokes and points. default: 'black'}
\item{\strong{\code{pattern_density}}}{ Approximate fill fraction of the pattern. Usually in range [0, 1], but can be higher. default: 0.2}
\item{\strong{\code{pattern_filename}}}{ Image filename/URL. }
-\item{\strong{\code{pattern_fill}}}{ Fill colour (or \code{\link[grid:patterns]{grid::pattern()}}/gradient fill). default: 'grey80'}
-\item{\strong{\code{pattern_fill2}}}{ Second fill colour (or \code{\link[grid:patterns]{grid::pattern()}}/gradient fill). default: '#4169E1'}
+\item{\strong{\code{pattern_fill}}}{ Fill colour (or \code{\link[grid:pattern]{grid::pattern()}}/gradient fill). default: 'grey80'}
+\item{\strong{\code{pattern_fill2}}}{ Second fill colour (or \code{\link[grid:pattern]{grid::pattern()}}/gradient fill). default: '#4169E1'}
\item{\strong{\code{pattern_filter}}}{ (Image scaling) filter. default: 'lanczos' }
\item{\strong{\code{pattern_frequency}}}{ Frequency. default: 0.1 }
\item{\strong{\code{pattern_gravity}}}{ Image placement. default: 'center' }
diff --git a/man/ggpattern-ggproto.Rd b/man/ggpattern-ggproto.Rd
index 535dee0..7b94e12 100644
--- a/man/ggpattern-ggproto.Rd
+++ b/man/ggpattern-ggproto.Rd
@@ -3,7 +3,6 @@
% R/geom-bin2d.R, R/geom-boxplot.R, R/geom-col.R, R/geom-crossbar.R,
% R/geom-ribbon.R, R/geom-density.R, R/geom-polygon.R, R/geom-map.R,
% R/geom-sf.R, R/geom-violin.R
-\docType{data}
\name{GeomRectPattern}
\alias{GeomRectPattern}
\alias{ggpattern-ggproto}
@@ -27,4 +26,3 @@ Geom ggproto objects that could be extended to create a new geom.
\seealso{
\link[ggplot2:Geom]{ggplot2::Geom}
}
-\keyword{datasets}
diff --git a/man/ggpattern.Rd b/man/ggpattern.Rd
index 5c4c4f3..e962145 100644
--- a/man/ggpattern.Rd
+++ b/man/ggpattern.Rd
@@ -47,6 +47,7 @@ Useful links:
Authors:
\itemize{
+ \item Trevor L. Davis \email{trevor.l.davis@gmail.com} (\href{https://orcid.org/0000-0001-6341-4639}{ORCID})
\item Mike FC
\item ggplot2 authors
}
diff --git a/man/scale_pattern_colour_viridis_d.Rd b/man/scale_pattern_colour_viridis_d.Rd
index 4cd91f8..16169cd 100644
--- a/man/scale_pattern_colour_viridis_d.Rd
+++ b/man/scale_pattern_colour_viridis_d.Rd
@@ -92,7 +92,7 @@ scale_pattern_fill2_viridis_c(
\code{\link[ggplot2:continuous_scale]{ggplot2::continuous_scale()}}, or \code{\link[ggplot2:binned_scale]{ggplot2::binned_scale()}} to control name, limits, breaks,
labels and so forth.}
-\item{begin, end, alpha, direction, option, values, space, na.value, guide}{See \code{\link[ggplot2:scale_viridis]{ggplot2::scale_colour_viridis_d()}} for more information}
+\item{begin, end, alpha, direction, option, values, space, na.value, guide}{See \code{\link[ggplot2:scale_colour_viridis_d]{ggplot2::scale_colour_viridis_d()}} for more information}
\item{aesthetics}{Character string or vector of character strings listing the
name(s) of the aesthetic(s) that this scale works with. This can be useful, for
diff --git a/tests/testthat/_snaps/fill/pattern-fill-fill.svg b/tests/testthat/_snaps/fill/pattern-fill-fill.svg
index dc9cadd..3c1d822 100644
--- a/tests/testthat/_snaps/fill/pattern-fill-fill.svg
+++ b/tests/testthat/_snaps/fill/pattern-fill-fill.svg
@@ -382,12 +382,15 @@
+
+
+
a
b
diff --git a/tests/testthat/_snaps/fill/pattern-fill-pattern-fill.svg b/tests/testthat/_snaps/fill/pattern-fill-pattern-fill.svg
index eec7a38..12b8b0a 100644
--- a/tests/testthat/_snaps/fill/pattern-fill-pattern-fill.svg
+++ b/tests/testthat/_snaps/fill/pattern-fill-pattern-fill.svg
@@ -1819,12 +1819,132 @@
trt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
a
b
diff --git a/tests/testthat/_snaps/fill/vectorized-pattern-fill.svg b/tests/testthat/_snaps/fill/vectorized-pattern-fill.svg
index d4e59fd..f9ade50 100644
--- a/tests/testthat/_snaps/fill/vectorized-pattern-fill.svg
+++ b/tests/testthat/_snaps/fill/vectorized-pattern-fill.svg
@@ -113,12 +113,15 @@
trt
+
+
+
a
b
diff --git a/tests/testthat/_snaps/geom-map/map.svg b/tests/testthat/_snaps/geom-map/map.svg
index e29580c..a5f6624 100644
--- a/tests/testthat/_snaps/geom-map/map.svg
+++ b/tests/testthat/_snaps/geom-map/map.svg
@@ -654,54 +654,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/testthat/_snaps/geometry-patterns/crosshatch.svg b/tests/testthat/_snaps/geometry-patterns/crosshatch.svg
index 876f7a2..2b3e129 100644
--- a/tests/testthat/_snaps/geometry-patterns/crosshatch.svg
+++ b/tests/testthat/_snaps/geometry-patterns/crosshatch.svg
@@ -153,12 +153,18 @@
trt
+
+
+
+
+
+
a
b
diff --git a/tests/testthat/_snaps/geometry-patterns/stripe.svg b/tests/testthat/_snaps/geometry-patterns/stripe.svg
index decacdc..59eda55 100644
--- a/tests/testthat/_snaps/geometry-patterns/stripe.svg
+++ b/tests/testthat/_snaps/geometry-patterns/stripe.svg
@@ -113,12 +113,15 @@
trt
+
+
+
a
b
diff --git a/tests/testthat/_snaps/geometry-patterns/weave.svg b/tests/testthat/_snaps/geometry-patterns/weave.svg
index 499127b..2a1009e 100644
--- a/tests/testthat/_snaps/geometry-patterns/weave.svg
+++ b/tests/testthat/_snaps/geometry-patterns/weave.svg
@@ -450,12 +450,18 @@
trt
+
+
+
+
+
+
a
b
diff --git a/tests/testthat/_snaps/scales/fill-brewer-fill2-grey.svg b/tests/testthat/_snaps/scales/fill-brewer-fill2-grey.svg
index 9a997d9..c5f452b 100644
--- a/tests/testthat/_snaps/scales/fill-brewer-fill2-grey.svg
+++ b/tests/testthat/_snaps/scales/fill-brewer-fill2-grey.svg
@@ -153,12 +153,18 @@
trt
+
+
+
+
+
+
a
b
diff --git a/tests/testthat/_snaps/scales/fill2-brewer-fill-grey.svg b/tests/testthat/_snaps/scales/fill2-brewer-fill-grey.svg
index 48c51e8..48957f9 100644
--- a/tests/testthat/_snaps/scales/fill2-brewer-fill-grey.svg
+++ b/tests/testthat/_snaps/scales/fill2-brewer-fill-grey.svg
@@ -153,12 +153,18 @@
trt
+
+
+
+
+
+
a
b
diff --git a/tests/testthat/_snaps/scales/missing-pattern.svg b/tests/testthat/_snaps/scales/missing-pattern.svg
index 3f59d8d..d7d9470 100644
--- a/tests/testthat/_snaps/scales/missing-pattern.svg
+++ b/tests/testthat/_snaps/scales/missing-pattern.svg
@@ -206,6 +206,7 @@
fill
+
diff --git a/tests/testthat/_snaps/scales/viridis-d.svg b/tests/testthat/_snaps/scales/viridis-d.svg
index e60bf1b..8aac2b2 100644
--- a/tests/testthat/_snaps/scales/viridis-d.svg
+++ b/tests/testthat/_snaps/scales/viridis-d.svg
@@ -153,12 +153,18 @@
trt
+
+
+
+
+
+
a
b