Commit Graph

5158 Commits

Author SHA1 Message Date
Elio Campitelli 5a61e2e656
Adds `bounds` to `geom_violin()` (#5494)
Closes #5493
2023-10-26 16:24:59 +02:00
Teun van den Brand f74dbbe53f
Minor ticks (#5287)
* Swap tick anchorpoint

* `Guide$build_ticks()` accepts a length value

* Add tick arguments

* `GuideAxis$extract_key()` can get minor ticks

* `GuideAxis$build_ticks()` makes draws minor ticks

* Fix bug with unlabelled breaks

* Adjust tick spacing

* Finishing touches

* Add test

* Accept tick-ordering changes in snapshots

* Add news bullet

* Fix expression labels

* Document

* Update snapshot

* minor tick theme options

* Revise minor to use theme

* Use `rel()` for minor ticks

* Biparental inheritance for minor tick length leaf nodes

* change minor break extraction

* Skip tick calculation with blank elements

* clean up axis ticks building

* change measurement function to width_cm/height_cm

* Remove redundant function
2023-10-24 13:52:14 +02:00
Jan Gleixner 1b2c312c54
fix typo in doc (#5490)
* fix typo in doc

* fix typo in doc
2023-10-21 15:56:12 +02:00
Teun van den Brand bf0c64faab
Merge in v3.4.4 to main (#5480)
* Cherry-pick from #5327

* Add a NEWS item

* Hotfix 3.4.4 (#5449)

* is.atomic() --> is.atomic() || is.null()

* Polish news

* Put is.null() first

* Cherrypick rgeos removal from description (#5453)

* Remove rgeos from the dependency (#5242)

---------

Co-authored-by: Hiroaki Yutani <yutani.ini@gmail.com>

* run revdepcheck

* Update CRAN comments

* Increment version number to 3.4.4

* Fix Version 3.4.4 NEWS Typo (#5479)

Change "the upcoming retirement of rproj, rgeos, and maptools"
to "the upcoming retirement of rgdal, rgeos, and maptools"

* Increment version number to 3.4.4.9000

---------

Co-authored-by: Hiroaki Yutani <yutani.ini@gmail.com>
Co-authored-by: Thomas Lin Pedersen <thomasp85@gmail.com>
Co-authored-by: Matt Nield <64328730+matthewjnield@users.noreply.github.com>
2023-10-13 09:00:42 +02:00
Teun van den Brand 6dd9bb6611
Absent legend titles take up no space (#5452)
* ignore absent title

* Add test

* Add news bullet

* Fix snapshot
2023-10-09 19:09:32 +02:00
Elio Campitelli 88357090ea
Removes usage of `stat_bin2d()` and similar (#5451)
* Removes usage of stat_bin2d

* Removes usage of stat_binhex()

* Removes geom_bin2d()

* Changes name in rd_aesthetics
2023-10-04 15:36:52 +02:00
Pedro Aphalo 182405b120
Bug-fix justification with angle in geom_label() (#5424)
Now that geom_label() supports rotation with angle, it is necessary to pass the angle as the third argument to compute_just() as it is done in geom_text() to ensure correct text justification.
2023-10-04 11:23:01 +02:00
Teun van den Brand a560c990d1
Guide training bugfix (#5428)
* Ensure scales/aesthetics are parallel

* Adapt tests

* Add argument names
2023-10-02 15:14:54 +02:00
Teun van den Brand 89204bcf7f
Device capabilities checker (#5350)
* backport isTRUE

* Implement `check_device()`

* Document

* Write tests

* Add NEWS bullet

* Wrap error-throwing example

* skip test for dev capabilities on R < 4.2.0

* Check next device when RStudioGD

* Allow testing for specific blending/compositing operation

* More vdiffr nuance

* Redocument

* Misplaced parenthesis

* Get out of pickle

* Add `maybe` argument

* Don't internally discriminate blending/compositing with `op` argument

* Cleaner vdiffr solution

* Polish docs a bit
2023-10-02 15:13:35 +02:00
Teun van den Brand 88d0517553
`stat_smooth()` drops failed groups (#5371)
* Return NULL when fit fails

* Add test

* Add news bullet

* Guarantee clean error in test

* Use `try_fetch()`
2023-10-02 14:32:15 +02:00
Teun van den Brand fd35a9e402
Fix for raster resolution (#5412)
* coord transformation after determining positions

* add tolerance to `resolution()`

* Add tests

* add news bullet
2023-10-02 14:02:40 +02:00
Thomas Lin Pedersen 0e72d95704
Simplify scales$add_default (#5409) 2023-10-02 13:28:56 +02:00
Teun van den Brand 202029b197
Delete utilies-table.R (#5426)
* Delete utilies-table.R

* Update collate directive
2023-10-02 12:02:20 +02:00
Teun van den Brand fa26a55b19
Scale call check (#5443)
* Fix #5436

* Add tests
2023-10-02 10:51:19 +02:00
Teun van den Brand ad337414c3
Move CRS responsibility from GuideAxis to CoordSf (#5440)
* Move CRS responsibility to CoordSf

* Fix typo
2023-10-02 10:50:24 +02:00
Teun van den Brand 72dcfadd62
Omit rownames from check (#5435) 2023-10-02 10:48:50 +02:00
Andrei 69e7430538
Improve labeller() behavior for lookup tables (#5432) 2023-09-22 16:20:51 +02:00
Hervé Pagès de7bad63c9
fortify.default() accepts data-frame-like objects (#5404)
* fortify.default() accepts data-frame-like objects

`fortify.default()` now accepts a data-frame-like object granted the
object exhibits healthy `dim()`, `colnames()`, and `as.data.frame()`
behaviors. Closes #5390.

* Update snapshot of ggplot(aes(x = x))

* Improve fortify.default() based on Teun's feedback

* Follow style guide a little bit more closely in error messages

(see https://style.tidyverse.org/error-messages.html)
2023-09-20 17:39:03 +02:00
Michael Chirico eb920afbeb
Don't attach Suggests package in test (#5420) 2023-09-18 15:25:18 +02:00
Zeki Akyol 25f54d994f
Update r4ds url (#5406)
* Update r4ds url

- This pull request updates r4ds(<https://r4ds.had.co.nz/>) to r4ds 2e (https://r4ds.hadley.nz/).

* run `devtools::build_readme()`

It updates **README.md** by running `devtools::build_readme()`.
2023-09-15 12:43:26 +02:00
Hiroaki Yutani ef9f8d6203
Require R >= 3.5 (#5422) 2023-09-14 22:25:39 +09:00
Davis Vaughan 954924b87b
Only call `zero_range()` and `as.numeric()` in transformed space (#5304)
* Only call `zero_range()` and `as.numeric()` in transformed space

In case the `limits` in data space don't support conversion to numeric

* Add comment with link to PR

* NEWS bullet

---------

Co-authored-by: Teun van den Brand <49372158+teunbrand@users.noreply.github.com>
2023-09-12 17:03:06 +02:00
Teun van den Brand 5da2d30049
Better scale messages (#5343)
* More informative calls in constructors

* Add test for scale calls

* Fix call for feed-forward scales

* Fix calls for gnarly default scales

* Fix calls for transformation scales

* Reoxygenate

* Supply `call` to messages

* Accept periods at ends of messages

* Forward calls to checkers

* Fix #4258

* `find_scale()` generates call

* `xlim`/`ylim` have appropriate calls

* `check_transformation()` throws more informative warning

* Remove orphaned code

* Deprecate `scale_name` argument

* Purge `scale_name`

* Test deprecation messages

* Add NEWS bullet

* conditionally test time scales
2023-09-12 15:19:20 +02:00
Teun van den Brand 67bb3bbea8
`<rel>` and `<unit>` theme inheritance (#5403)
* Allow rel in element tree

* Allow combining of rel elements

* Add test

* Add news bullet

* Fix test for pre-R4.0.0 units

* Also apply `rel` to numerics
2023-09-12 13:53:10 +02:00
Hiroaki Yutani 22ed73cf34
Add "Get started" section on the pkgdown site (#5415) 2023-09-12 19:37:53 +09:00
Teun van den Brand 0d2023d53c
Violin resolution (#5402)
* Preserve mapped_discrete class

* Add test

* Add news bullet
2023-09-12 08:55:23 +02:00
Teun van den Brand f6269b0ae3
Introduction vignette (#5159)
* Draft introduction vignette

* Fix index entry

* Add as pkgdown article

* Apply suggestions from code review

Co-authored-by: Mine Cetinkaya-Rundel <cetinkaya.mine@gmail.com>

* move mapping to main call

* `displ` -> `cty`

* Add cake

* `coord_polar()` -> `coord_fixed()`

* `vars()` -> formula

* Show stacking layers early on

* Rephrase what a mapping does

* Misc. tinkering

* Rename

* things -> alterations

* Add alt text

* Unlist from pkgdown

* Apply suggestions from code review

Co-authored-by: Mine Cetinkaya-Rundel <cetinkaya.mine@gmail.com>

* Incorporate review suggestions

---------

Co-authored-by: Mine Cetinkaya-Rundel <cetinkaya.mine@gmail.com>
2023-09-11 19:05:19 +02:00
Michael Chirico 3664af8c98
Correct likely bug in geom-boxplot (#5413) 2023-09-09 00:48:46 +02:00
Arthur Yip d180248704
Update documentation and example in scale-brewer.R to reflect scale_*_distiller's non-intuitive "direction" (#5381)
* Update scale-brewer.R

Capturing in documentation that scale_*_distiller has a non-intuitive default direction = -1, and that to reverse, user needs to specify direction = 1

Source:
https://github.com/tidyverse/ggplot2/issues/1439
https://github.com/tidyverse/ggplot2/issues/4444

* Move comment from Details to Note

* Document

---------

Co-authored-by: yutannihilation <yutannihilation@users.noreply.github.com>
2023-09-04 09:26:02 +02:00
Teun van den Brand c76b9aeda6
Boxplot staples (#5372)
* Implement staples

* Document

* Add test

* Add check for staplewidth

* Fix typo
2023-08-17 18:19:44 +02:00
Thomas Lin Pedersen 8af03a9ed9
Merge pull request #5380 from tidyverse/v3.4.3-rc
Release 3.4.3
2023-08-15 12:51:35 +02:00
Thomas Lin Pedersen 62a5f4a0db
Merge branch 'main' into v3.4.3-rc 2023-08-14 14:19:18 +02:00
Thomas Lin Pedersen e89befcb47
Update version 2023-08-14 14:16:45 +02:00
Teun van den Brand 2cd0e96eba
Preserve aesthetics in colourbar merge (#5328)
* Preserve aesthetics in colourbar merge
2023-08-09 21:25:09 +02:00
Teun van den Brand bde88f82a1
Convert `size` -> `linewidth` in `annotation_logticks()` (#5330) 2023-08-07 22:00:22 +02:00
Teun van den Brand da2a8e80d2
Consider `linewidth` in legend key sizes (#5346)
* Key size accounts for linewidth

* Add test

* Add bullet
2023-08-07 21:21:19 +02:00
Teun van den Brand 939562927c
Fix partial matching (#5378) 2023-08-07 20:48:42 +02:00
Teun van den Brand df1b901b15
Discarding boxplot outliers (#5379)
* Add `outliers` param to boxplot

* Add test

* Redocument

* Add news bullet
2023-08-07 20:26:52 +02:00
Teun van den Brand 466344ae15
Miscellaneous improvements to guides (#5345)
* Handle `labels = NULL` better

* Convert `guides()` error to warning

* Ignore no guides

* Swap old train order

* Fix `even.steps`/`show.limits` interaction

* Change to soft deprecation

* Fix old guide title

* Fix `draw_axis()` with `NULL` labels

* Default old guide title is `waiver()`

* `guide_for_position` becomes <Guides> method

* GuideColoursteps is a named class

* `guide_colourbar()` rejects discrete scales

* Fix test TODO

* Use `vec_slice()` to preserve attributes

* Document extension points

* Handle hashing in `train()`
2023-08-07 20:10:01 +02:00
Teun van den Brand 6bc0a7f3e7 Increment version number to 3.4.3 2023-08-07 20:05:56 +02:00
Teun van den Brand 72b891feed update cran-comments.md 2023-08-01 21:47:01 +02:00
Teun van den Brand f4b2dab997
Fix version comparison (#5376)
* Reimplement #5367

* Override default density method
2023-08-01 21:25:44 +02:00
Teun van den Brand cd7199dcc4
Binned limits and reverse transform (#5357)
* Borrow `get_limits()` method

* Consider sort-order of limits

* Add tests

* Add news bullet
2023-08-01 20:20:29 +02:00
Teun van den Brand a747da370e
Deprecate `legend.title.align` and `legend.text.align` (#5362)
* soft-deprecate `legend.text/title.align`

* Remove `legend.text/title.align` from element tree

* Absolve default themes

* Absolve guides

* Don't recommend `legend.title.align`

* Add news bullet
2023-08-01 19:54:05 +02:00
Teun van den Brand af4cc02e1e
Passing parameters to `trans` argument (#5361) 2023-08-01 18:54:39 +02:00
Teun van den Brand d21ac51dcb
Integers as valid input to theme (#5370)
* Theme accepts integers

* Add test

* Add news bullet
2023-08-01 18:53:36 +02:00
Teun van den Brand 1f27ffec30
Update ggsave docs (#5351) 2023-07-22 13:31:40 +02:00
Teun van den Brand 6e78749a02
Override default density method (#5358) 2023-07-20 07:35:06 +02:00
Florian Kohrt 2a7ca74e29
Fix typo (#5340)
Add `ymax` instead of `ymin` twice
2023-06-29 17:15:45 +02:00
Andrei 23508b3213
Nicer error message in coord-* functions (#4894)
* Add `check_coord_limits` utility function

* Use `check_coord_limits` in all `coord-*` functions

* Update NEWS.md

* Update test-coord-* comments to better reflect expected behavior
2023-06-23 21:50:16 +02:00