Skip to content

Commit

Permalink
Merge branch 'main' into delayed_geom_defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Oct 30, 2024
2 parents 18e38a9 + 3faa53a commit 9d2f429
Show file tree
Hide file tree
Showing 159 changed files with 2,327 additions and 1,534 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
cache-version: 3
extra-packages: >
any::rcmdcheck,
Hmisc=?ignore-before-r=4.1.0,
Hmisc=?ignore-before-r=4.2.0,
quantreg=?ignore-before-r=4.3.0
needs: check

Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ggplot2
Version: 3.5.1.9000
Title: Create Elegant Data Visualisations Using the Grammar of Graphics
Version: 3.5.1.9000
Authors@R: c(
person("Hadley", "Wickham", , "hadley@posit.co", role = "aut",
comment = c(ORCID = "0000-0003-4757-117X")),
Expand Down Expand Up @@ -30,7 +30,7 @@ License: MIT + file LICENSE
URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
BugReports: https://github.com/tidyverse/ggplot2/issues
Depends:
R (>= 3.5)
R (>= 4.0)
Imports:
cli,
grDevices,
Expand Down Expand Up @@ -75,6 +75,7 @@ VignetteBuilder:
knitr
Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate
Config/testthat/edition: 3
Config/usethis/last-upkeep: 2024-10-24
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2020 ggplot2 authors
Copyright (c) 2024 ggplot2 core developer team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ documentation updates.
* `annotate()` now warns about `stat` or `position` arguments (@teunbrand, #5151)
* `guide_coloursteps(even.steps = FALSE)` now works with discrete data that has
been formatted by `cut()` (@teunbrand, #3877).
* `ggsave()` now offers to install svglite if needed (@eliocamp, #6166).

# ggplot2 3.5.0

Expand Down
2 changes: 1 addition & 1 deletion R/geom-map.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ NULL
#' # how `geom_map()` works. It requires two data frames:
#' # One contains the coordinates of each polygon (`positions`), and is
#' # provided via the `map` argument. The other contains the
#' # other the values associated with each polygon (`values`). An id
#' # values associated with each polygon (`values`). An id
#' # variable links the two together.
#'
#' ids <- factor(c("1.1", "2.1", "1.2", "2.2", "1.3", "2.3"))
Expand Down
5 changes: 4 additions & 1 deletion R/save.R
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ plot_dev <- function(device, filename = NULL, dpi = 300, call = caller_env()) {
ps = eps,
tex = function(filename, ...) grDevices::pictex(file = filename, ...),
pdf = function(filename, ..., version = "1.4") grDevices::pdf(file = filename, ..., version = version),
svg = function(filename, ...) svglite::svglite(file = filename, ...),
svg = function(filename, ...) {
check_installed("svglite", reason = "to save as SVG.")
svglite::svglite(file = filename, ...)
},
# win.metafile() doesn't have `bg` arg so we need to absorb it before passing `...`
emf = function(..., bg = NULL) grDevices::win.metafile(...),
wmf = function(..., bg = NULL) grDevices::win.metafile(...),
Expand Down
2 changes: 1 addition & 1 deletion R/stat-ellipse.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#' @references John Fox and Sanford Weisberg (2011). An \R Companion to
#' Applied Regression, Second Edition. Thousand Oaks CA: Sage. URL:
#' \url{https://socialsciences.mcmaster.ca/jfox/Books/Companion/}
#' \url{https://www.john-fox.ca/Companion/}
#' @references Michael Friendly. Georges Monette. John Fox. "Elliptical Insights: Understanding Statistical Methods through Elliptical Geometry."
#' Statist. Sci. 28 (1) 1 - 39, February 2013. URL: \url{https://projecteuclid.org/journals/statistical-science/volume-28/issue-1/Elliptical-Insights-Understanding-Statistical-Methods-through-Elliptical-Geometry/10.1214/12-STS402.full}
#'
Expand Down
15 changes: 9 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ output: github_document

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

```{r, echo = FALSE}
```{r}
#| echo: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```

# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" alt="ggplot2 website" /></a>

<!-- badges: start -->
[![R-CMD-check](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/tidyverse/ggplot2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2?branch=main)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
[![Codecov test coverage](https://codecov.io/gh/tidyverse/ggplot2/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2)
<!-- badges: end -->

## Overview
Expand All @@ -26,7 +27,8 @@ ggplot2 is a system for declaratively creating graphics, based on [The Grammar o

## Installation

```{r, eval = FALSE}
```{r}
#| eval: false
# The easiest way to get ggplot2 is to install the whole tidyverse:
install.packages("tidyverse")
Expand All @@ -40,13 +42,14 @@ pak::pak("tidyverse/ggplot2")

## Cheatsheet

<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252"/></a>
<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252" alt="ggplot2 cheatsheet" /></a>

## Usage

It's hard to succinctly describe how ggplot2 works because it embodies a deep philosophy of visualisation. However, in most cases you start with `ggplot()`, supply a dataset and aesthetic mapping (with `aes()`). You then add on layers (like `geom_point()` or `geom_histogram()`), scales (like `scale_colour_brewer()`), faceting specifications (like `facet_wrap()`) and coordinate systems (like `coord_flip()`).

```{r example}
```{r}
#| label: example
#| fig.alt: "Scatterplot of engine displacement versus highway miles per
#| gallon, for 234 cars coloured by 7 'types' of car. The displacement and miles
#| per gallon are inversely correlated."
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

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

# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
# ggplot2 <a href="https://ggplot2.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" alt="ggplot2 website" /></a>

<!-- badges: start -->

[![R-CMD-check](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverse/ggplot2/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/tidyverse/ggplot2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2?branch=main)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggplot2)](https://cran.r-project.org/package=ggplot2)
[![Codecov test
coverage](https://codecov.io/gh/tidyverse/ggplot2/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/ggplot2)
<!-- badges: end -->

## Overview
Expand All @@ -35,7 +35,7 @@ pak::pak("tidyverse/ggplot2")

## Cheatsheet

<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252"/></a>
<a href="https://github.com/rstudio/cheatsheets/blob/master/data-visualization.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/master/pngs/thumbnails/data-visualization-cheatsheet-thumbs.png" width="630" height="252" alt="ggplot2 cheatsheet" /></a>

## Usage

Expand Down
22 changes: 21 additions & 1 deletion man/figures/lifecycle-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion man/figures/lifecycle-experimental.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 29 additions & 1 deletion man/figures/lifecycle-stable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion man/figures/lifecycle-superseded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/geom_map.Rd

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

2 changes: 1 addition & 1 deletion man/stat_ellipse.Rd

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

Binary file modified pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions pkgdown/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions pkgdown/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Binary file added pkgdown/favicon/web-app-manifest-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/web-app-manifest-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions tests/testthat/_snaps/aes-calculated.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@

Duplicated aesthetics after name standardisation: colour

# calculated aesthetics throw warnings when lengths mismatch

Failed to apply `after_stat()` for the following aesthetic: colour.

---

Failed to apply `after_scale()` for the following aesthetic: colour.

# A deprecated warning is issued when stat(var) or ..var.. is used

`stat(foo)` was deprecated in ggplot2 3.4.0.
Expand Down
Loading

0 comments on commit 9d2f429

Please sign in to comment.