Skip to content

Commit

Permalink
docs: Eliminate {pkgdown} notes
Browse files Browse the repository at this point in the history
* Update to Bootstrap 5 (from 3)
* Add alt text to vignette and README images
* Mention how to install dev version from R-universe
  • Loading branch information
trevorld committed Dec 13, 2024
1 parent 2bef789 commit 690c0be
Show file tree
Hide file tree
Showing 20 changed files with 206 additions and 235 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: ggpattern
Type: Package
Title: 'ggplot2' Pattern Geoms
Version: 1.1.2-1
Version: 1.1.2-2
Authors@R: c(person("Mike", "FC", role = "aut"),
person("Trevor L.", "Davis", role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0001-6341-4639")),
person("ggplot2 authors", role = "aut"))
Description: Provides 'ggplot2' geoms filled with various patterns. Includes a patterned version of every 'ggplot2' geom that has a region that can be filled with a pattern. Provides a suite of 'ggplot2' aesthetics and scales for controlling pattern appearances. Supports over a dozen builtin patterns (every pattern implemented by 'gridpattern') as well as allowing custom user-defined patterns.
URL: https://github.com/trevorld/ggpattern, https://trevorldavis.com/R/ggpattern/dev/
URL: https://github.com/trevorld/ggpattern, https://trevorldavis.com/R/ggpattern/
BugReports: https://github.com/trevorld/ggpattern/issues
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Bug fixes and minor improvements

* Added alt text to vignette and README images.
* Added missing package anchors to a few Rd cross-references (#128).

# ggpattern 1.1.1
Expand Down
32 changes: 17 additions & 15 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
Expand Down Expand Up @@ -66,7 +62,13 @@ probably the best way to get started.

## Installation

You can install the development version from [GitHub](https://github.com/trevorld/ggpattern) with the following instructions:
You can install the development version from [R-universe](https://trevorld.r-universe.dev/ggpattern)

``` r
install.packages('ggpattern', repos = c('https://trevorld.r-universe.dev', 'https://cloud.r-project.org'))
```

or straight from the source hosted on Github using the `{remotes}` package:

``` r
# install.packages("remotes")
Expand All @@ -79,7 +81,7 @@ You can install the CRAN release version using:
install.packages("ggpattern")
```

Do note though that due to CRAN size limitations **the CRAN version omits several vignettes** that are contained in the development version.
Do note though that due to CRAN size limitations **the CRAN version omits several vignettes** that are contained in the development version (as well as on the [package website](https://trevorldavis.com/R/ggpattern/).

An installation error is highly unlikely to be an issue with `{ggpattern}` itself. Please don't open up a Github Issues unless you are **sure** it is an issue with `{ggpattern}` itself. If you have an error installing the package we strongly suggest that you look at **all** your error messages more closely to figure out which package dependency is failing to install and why. See https://thomasadventure.blog/posts/install-r-packages/ for more info on installing R packages.

Expand All @@ -91,7 +93,7 @@ An installation error is highly unlikely to be an issue with `{ggpattern}` itsel
and set other options using `pattern_*` aesthetics


```{r fig.width = 8, fig.height = 4, fig.cap = ""}
```{r fig.width = 8, fig.height = 4, fig.cap = "", fig.alt= "A bar chart with striped bars"}
df <- data.frame(level = c("a", "b", "c", 'd'), outcome = c(2.3, 1.9, 3.2, 1))
ggplot(df) +
Expand All @@ -114,14 +116,14 @@ ggplot(df) +
# Gallery

<div>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-"><img width="45%" src="man/figures/readme/gallery-bar-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#b-w-example"><img width="45%" src="man/figures/readme/gallery-bar-bw.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#colour-example-1"><img width="45%" src="man/figures/readme/gallery-bar-colour.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-coord-flip-and-fit-image-to-height-and-graivty-towards-the-east-"><img width="45%" src="man/figures/readme/gallery-bar2-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-grid.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-map-pattern-"><img width="45%" src="man/figures/readme/gallery-map-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-rect-pattern-"><img width="45%" src="man/figures/readme/gallery-rect-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-"><img width="45%" src="man/figures/readme/gallery-bar-array.jpg" alt="Example of bar chart filled with the 'kitten' 'placeholder' pattern"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#b-w-example"><img width="45%" src="man/figures/readme/gallery-bar-bw.jpg" alt="Example of bar chart filled with black and white 'geometry' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#colour-example-1"><img width="45%" src="man/figures/readme/gallery-bar-colour.jpg" alt="Example of a bar chart filled with colored 'geometry' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-coord-flip-and-fit-image-to-height-and-graivty-towards-the-east-"><img width="45%" src="man/figures/readme/gallery-bar2-array.jpg" alt="A horizontal bar charts with flag images at the end of each bar"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-array.jpg" alt="A density chart filled with 'image' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-grid.jpg" alt="A density chart filled with 'geometry' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-map-pattern-"><img width="45%" src="man/figures/readme/gallery-map-array.jpg" alt="A map filled with greyscale 'magick' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-rect-pattern-"><img width="45%" src="man/figures/readme/gallery-rect-array.jpg" alt="Rectangles filled with gradients"/> </a>
<div>


Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->


Expand Down Expand Up @@ -30,7 +26,13 @@ probably the best way to get started.

## Installation

You can install the development version from [GitHub](https://github.com/trevorld/ggpattern) with the following instructions:
You can install the development version from [R-universe](https://trevorld.r-universe.dev/ggpattern)

``` r
install.packages('ggpattern', repos = c('https://trevorld.r-universe.dev', 'https://cloud.r-project.org'))
```

or straight from the source hosted on Github using the `{remotes}` package:

``` r
# install.packages("remotes")
Expand All @@ -43,7 +45,7 @@ You can install the CRAN release version using:
install.packages("ggpattern")
```

Do note though that due to CRAN size limitations **the CRAN version omits several vignettes** that are contained in the development version.
Do note though that due to CRAN size limitations **the CRAN version omits several vignettes** that are contained in the development version (as well as on the [package website](https://trevorldavis.com/R/ggpattern/).

An installation error is highly unlikely to be an issue with `{ggpattern}` itself. Please don't open up a Github Issues unless you are **sure** it is an issue with `{ggpattern}` itself. If you have an error installing the package we strongly suggest that you look at **all** your error messages more closely to figure out which package dependency is failing to install and why. See https://thomasadventure.blog/posts/install-r-packages/ for more info on installing R packages.

Expand All @@ -56,7 +58,7 @@ An installation error is highly unlikely to be an issue with `{ggpattern}` itsel



```r
``` r
df <- data.frame(level = c("a", "b", "c", 'd'), outcome = c(2.3, 1.9, 3.2, 1))

ggplot(df) +
Expand All @@ -75,20 +77,20 @@ ggplot(df) +
coord_fixed(ratio = 1/2)
```

<img src="man/figures/README-unnamed-chunk-2-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-2-1.png" alt="A bar chart with striped bars" width="100%" />


# Gallery

<div>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-"><img width="45%" src="man/figures/readme/gallery-bar-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#b-w-example"><img width="45%" src="man/figures/readme/gallery-bar-bw.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#colour-example-1"><img width="45%" src="man/figures/readme/gallery-bar-colour.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-coord-flip-and-fit-image-to-height-and-graivty-towards-the-east-"><img width="45%" src="man/figures/readme/gallery-bar2-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-grid.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-map-pattern-"><img width="45%" src="man/figures/readme/gallery-map-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-rect-pattern-"><img width="45%" src="man/figures/readme/gallery-rect-array.jpg" /> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-"><img width="45%" src="man/figures/readme/gallery-bar-array.jpg" alt="Example of bar chart filled with the 'kitten' 'placeholder' pattern"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#b-w-example"><img width="45%" src="man/figures/readme/gallery-bar-bw.jpg" alt="Example of bar chart filled with black and white 'geometry' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#colour-example-1"><img width="45%" src="man/figures/readme/gallery-bar-colour.jpg" alt="Example of a bar chart filled with colored 'geometry' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-bar-pattern-coord-flip-and-fit-image-to-height-and-graivty-towards-the-east-"><img width="45%" src="man/figures/readme/gallery-bar2-array.jpg" alt="A horizontal bar charts with flag images at the end of each bar"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-array.jpg" alt="A density chart filled with 'image' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-geometry.html#geom-density-pattern-"><img width="45%" src="man/figures/readme/gallery-density-grid.jpg" alt="A density chart filled with 'geometry' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-map-pattern-"><img width="45%" src="man/figures/readme/gallery-map-array.jpg" alt="A map filled with greyscale 'magick' patterns"/> </a>
<a href="https://trevorldavis.com/R/ggpattern/dev/articles/geom-gallery-array.html#geom-rect-pattern-"><img width="45%" src="man/figures/readme/gallery-rect-array.jpg" alt="Rectangles filled with gradients"/> </a>
<div>


Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ destination: "../../websites/R/ggpattern/"
url: "https://trevorldavis.com/R/ggpattern"
development:
mode: auto
template:
bootstrap: 5
reference:
- title: "ggpattern package"
desc: "High level package description"
Expand Down
2 changes: 1 addition & 1 deletion man/ggpattern.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/create-logo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ suppressPackageStartupMessages({
Creating the hex logo for `ggpattern`
------------------------------------------------------------------------------

```{r logo}
```{r logo, fig.alt="The ggpattern logo: a ggplot2 plot of a striped hexagon."}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Data frame for a polygon
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion vignettes/developing-patterns.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ the geom - in this case we will be using `pattern = 'complex'`.
options(ggpattern_geometry_funcs = list(tiling3 = tiling3_pattern))
```

```{r}
```{r tiling3_pattern, fig.alt = "ggplot2 plot using a custom polygon tiling pattern fill."}
df <- data.frame(trt = c("a", "b", "c"), outcome = c(2.3, 1.9, 3.2))
ggplot(df, aes(trt, outcome)) +
geom_col_pattern(aes(fill = trt, pattern_type = trt),
Expand Down
Loading

0 comments on commit 690c0be

Please sign in to comment.