Commit Graph

9 Commits

Author SHA1 Message Date
Teun van den Brand
a660093fa5 Compatibility with ggplot2 4.0.0 (#4226)
* add S7 class method

* Update tests/testthat/test-plot-coordmap.R

---------

Co-authored-by: Winston Chang <winston@stdout.org>
2025-06-09 17:20:43 -05:00
Hadley Wickham
64c5a67a0e Use testthat 3e (#3274) 2021-01-29 10:34:14 -06:00
Carson Sievert
57cc44f662 Coordmap info should retain discrete limits (#2410)
* ggplot2 input brushes should retain discrete range mapping, and be imposed in brushedPoints(), closes #1433

* simplify logic and reduce required storage

* get nearPoints() working as well, cleanup

* only remember scale range if ggplot is facet with a free discrete axis

* Use the scale limits (before the range) since the former is specified, that's what is actually shown on the plot

also, introduce within_brush() helper to consistently handle missing values produced by asNumber()

* also use scale limits in older versions of ggplot2

* DRY

* discrete_mapping -> discrete_limits; better comments

* update test expectation

* a couple unit tests

* update comment to reflect new coordmap data structure

* use unlink() not rm()

* add some tests for specifying scale limits and labels

* Use get_limits() if available

* update news

* better name and comment for new asNumber() argument
2019-05-14 16:34:00 -05:00
Winston Chang
a60301810f Update coordmap tests 2018-08-10 19:42:11 -05:00
Joe Cheng
54353e0e1f Fix coordmap unit tests 2018-02-09 11:12:46 -08:00
Winston Chang
fe943b5e95 Update plot interaction for ggplot2 > 2.2.1 2017-02-09 11:01:47 -06:00
Winston Chang
22598b693c Add more plot interaction tests 2016-09-27 23:07:23 -05:00
Winston Chang
b4565e7354 Fix coordmap tests 2016-03-22 11:05:59 -05:00
Winston Chang
5e98b930ee Move tests from inst/ to tests/ 2016-03-03 15:00:51 -06:00