Skip to content

Commit

Permalink
changed guide options test due to ggplot 2.2.0 changes to theme_bw
Browse files Browse the repository at this point in the history
changed vignette to avoid layer-levle mappings which now produce warnings
  • Loading branch information
wmurphyrd committed Oct 23, 2016
1 parent eb2323c commit 2302bbe
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: colorplaner
Type: Package
Title: A ggplot2 Extension to Visualize Two Variables per Color Aesthetic
Through Color Space Projections
Version: 0.1.2
Version: 0.1.2.9000
Date: 2016-10-02
Authors@R: c(person("William", "Murphy",
email = "william.murphy.rd@gmail.com",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 0.1.2.9000 (devel)
* Change tests to compensate for ggplot2 2.2.0 changes
* Due to ggplot2 2.2.0 changes, mapping a colorplane at the level of an individual layer will now produce a false warning messsage, but full functionality remains intact

# Version 0.1.2
* Fixed an issue that was preventing updated vignettes from building
* Complete versions of `colorplaner` and `other_projections` vignettes
Expand Down
Binary file modified figure/colorplane-advanced-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figure/colorplane-basics-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figure/colorplane-basics-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figure/colorplane-concept-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figure/colorplane-interpretation-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figure/colorplane-interpretation-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figure/intro-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
The colorplaner R package is a ggplot2 extension to visualize two variables through one color aesthetic via mapping to a color space projection. With this technique for 2-D color mapping, one can create a dichotomous choropleth in R as
well as other visualizations with bivariate color scales. The extension implements two new scales, `scale_color_colorplane` and `scale_fill_colorplane`, two new aesthetics, `color2` and `fill2`, and a new guide `guide_colorplane`.


```
## Warning: Ignoring unknown aesthetics: color2
```

![Example use of colorplane with the iris dataset.](figure/intro-1.png)


Expand All @@ -27,6 +32,10 @@ install.packages("colorplaner")
devtools::install_github("wmurphyrd/colorplaner")
```

#### Version 0.1.2.9000 (devel)
* Change tests to compensate for ggplot2 2.2.0 changes
* Due to ggplot2 2.2.0 changes, mapping a colorplane at the level of an individual layer will now produce a false warning messsage, but full functionality remains intact

#### Version 0.1.2
* Fixed an issue that was preventing updated vignettes from building
* Complete versions of `colorplaner` and `other_projections` vignettes
Expand Down
Binary file modified tests/testthat/Rplots.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/testthat/test_guide_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# along with colorplaner. If not, see <http://www.gnu.org/licenses/>.

text_theme <- theme_bw() %+%
theme(text =
element_text(color = "red", family = "mono"))
theme(text = element_text(color = "red", family = "mono"),
axis.text = element_text(color = "red", family = "mono"))

test_that("Title options", {
expect_silent(print(
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test_scale_training.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ test_that("Plots with no valid mapping give informative message", {
})

test_that("Layer-level mappings produce guide axis titles without error", {
expect_silent(
expect_error(
print(ggplot(aqd, aes(x = Temp, y = Ozone)) +
geom_ribbon(aes(ymin = lwr, ymax = upr), alpha = .35) +
geom_point(aes(color = Month, color2 = Day)) +
geom_rug() +
scale_color_colorplane() +
ggtitle("Points over grey ribbon"))
)
ggtitle("Points over grey ribbon")),
NA)
})
6 changes: 3 additions & 3 deletions vignettes/colorplaner.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ well as other visualizations with bivariate color scales. The extension implemen
data(iris)
iris_plot <- ggplot(iris,
aes(x = Petal.Length, y = Petal.Width, shape = Species)) +
geom_point(aes(color = Sepal.Length, color2 = Sepal.Width),
position = "jitter") +
aes(x = Petal.Length, y = Petal.Width, shape = Species,
color = Sepal.Length, color2 = Sepal.Width)) +
geom_point(position = "jitter") +
scale_color_colorplane(limits = range(iris$Sepal.Length),
limits_y = range(iris$Sepal.Width),
breaks_y = function(x)seq.int(x[1], x[2]),
Expand Down

0 comments on commit 2302bbe

Please sign in to comment.