Skip to content

Commit

Permalink
Fixes Open-Systems-Pharmacology#272 set transparency for molecular plots
Browse files Browse the repository at this point in the history
  • Loading branch information
pchelle committed May 19, 2022
1 parent 6b4ea23 commit 921edff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/aaa-utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ parseAddScatterLayer <- function() {
shape = mapLabels$shape
),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$points$size, position = 0, aesthetic = "size"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$points$alpha, aesthetic = "alpha"),
na.rm = TRUE,
show.legend = TRUE
)
Expand Down Expand Up @@ -141,6 +142,7 @@ parseAddLineLayer <- function(type, value, position) {
),
"color=getAestheticValues(n=1,selectionKey=plotConfiguration$lines$color,position=", position, ',aesthetic="color"),',
"linetype=getAestheticValues(n=1,selectionKey=plotConfiguration$lines$linetype,position=", position, ',aesthetic="linetype"),',
"alpha=getAestheticValues(n=1,selectionKey=plotConfiguration$lines$alpha,position=", position, ',aesthetic="alpha"),',
"size=getAestheticValues(n=1,selectionKey=plotConfiguration$lines$size,position=", position, ', aesthetic="size"))'
))
}
Expand All @@ -164,6 +166,7 @@ parseAddUncertaintyLayer <- function() {
# Error bar size uses a ratio of 1/4 to match with point size
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$errorbars$size, position = 0, aesthetic = "size"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$errorbars$linetype, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$errorbars$alpha, aesthetic = "linetype"),
na.rm = TRUE,
show.legend = TRUE
)
Expand Down
2 changes: 2 additions & 0 deletions R/plot-ddiratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ plotDDIRatio <- function(data,
na.rm = TRUE,
color = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$color, position = lineIndex, aesthetic = "color"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$linetype, position = lineIndex, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$alpha, position = lineIndex, aesthetic = "alpha"),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$size, position = lineIndex, aesthetic = "size")
) +
ggplot2::geom_path(
Expand All @@ -68,6 +69,7 @@ plotDDIRatio <- function(data,
na.rm = TRUE,
color = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$color, position = lineIndex, aesthetic = "color"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$linetype, position = lineIndex, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$alpha, position = lineIndex, aesthetic = "alpha"),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$size, position = lineIndex, aesthetic = "size")
)

Expand Down
2 changes: 2 additions & 0 deletions R/plot-obs-vs-pred.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ plotObsVsPred <- function(data,
mapping = ggplot2::aes_string(x = mapLabels$x, y = mapLabels$y),
color = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$color, position = lineIndex, aesthetic = "color"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$linetype, position = lineIndex, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$alpha, position = lineIndex, aesthetic = "alpha"),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$size, position = lineIndex, aesthetic = "size")
)
}
Expand All @@ -75,6 +76,7 @@ plotObsVsPred <- function(data,
na.rm = TRUE,
color = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$color, position = lineIndex, aesthetic = "color"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$linetype, position = lineIndex, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$alpha, position = lineIndex, aesthetic = "alpha"),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$size, position = lineIndex, aesthetic = "size")
)
}
Expand Down
2 changes: 2 additions & 0 deletions R/plot-res-vs-pred.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ plotResVsPred <- function(data,
mapping = ggplot2::aes_string(x = mapLabels$x, y = mapLabels$y),
color = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$color, position = lineIndex, aesthetic = "color"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$linetype, position = lineIndex, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$alpha, position = lineIndex, aesthetic = "alpha"),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$size, position = lineIndex, aesthetic = "size")
)
}
Expand All @@ -65,6 +66,7 @@ plotResVsPred <- function(data,
na.rm = TRUE,
color = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$color, position = lineIndex, aesthetic = "color"),
linetype = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$linetype, position = lineIndex, aesthetic = "linetype"),
alpha = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$alpha, position = lineIndex, aesthetic = "alpha"),
size = getAestheticValues(n = 1, selectionKey = plotConfiguration$lines$size, position = lineIndex, aesthetic = "size")
)
}
Expand Down

0 comments on commit 921edff

Please sign in to comment.