Skip to content

Fix/smooth alpha #552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: plotly
Title: Create Interactive Web Graphics via 'plotly.js'
Version: 3.4.14
Version: 3.4.15
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
email = "cpsievert1@gmail.com"),
person("Chris", "Parmer", role = c("aut", "cph"),
Expand Down
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.4.15 -- 18 Apr 2016

BUGFIX:

The alpha in geom_smooth was incorrectly inheriting from other layers. See #551.

3.4.14 -- 15 Apr 2016

CHANGES:
Expand Down
1 change: 1 addition & 0 deletions R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
# attach a new column (hovertext) to each layer of data that should get mapped
# to the text trace property
data <- Map(function(x, y) {
if (nrow(x) == 0) return(x)
# make sure the relevant aes exists in the data
for (i in seq_along(y)) {
aesName <- names(y)[[i]]
Expand Down
3 changes: 2 additions & 1 deletion R/layers2traces.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ to_basic.GeomBoxplot <- function(data, prestats_data, layout, params, p, ...) {
#' @export
to_basic.GeomSmooth <- function(data, prestats_data, layout, params, p, ...) {
dat <- prefix_class(data, "GeomPath")
dat$alpha <- NULL
# alpha for the path is always 1 (see GeomSmooth$draw_key)
dat$alpha <- 1
if (!identical(params$se, FALSE)) {
dat2 <- prefix_class(ribbon_dat(data), c("GeomPolygon", "GeomSmooth"))
dat2$colour <- NULL
Expand Down