Skip to content

Commit

Permalink
add option for residual vs observed ddi ratio horizontal line (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahhamadeh authored Nov 9, 2021
1 parent 29f2739 commit aea83b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion R/aaa-utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ parseAddLineLayer <- function(type, value, position) {
switch(type,
"horizontal" = paste0("ggplot2::geom_hline(yintercept = ", value, ","),
"vertical" = paste0("ggplot2::geom_vline(xintercept = ", value, ","),
"diagonal" = paste0("ggplot2::geom_abline(slope=1, intercept = ", value, ",")
"diagonal" = paste0("ggplot2::geom_abline(slope=1, intercept = ", value, ","),
"ddiHorizontal" = paste0("ggplot2::geom_abline(slope=0, intercept = ", value, ",")
),
"color=getAestheticValues(n=1,selectionKey=plotConfiguration$lines$color,position=", position, ',aesthetic="color"),',
"linetype=getAestheticValues(n=1,selectionKey=plotConfiguration$lines$linetype,position=", position, ',aesthetic="linetype"),',
Expand Down
3 changes: 1 addition & 2 deletions R/plot-ddiratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ plotDDIRatio <- function(data,

lineOrientation <- "diagonal"
if(residualsVsObserved){
lineOrientation <- "horizontal"
lineOrientation <- "ddiHorizontal"
}

# Include horizontal lines
for (lineIndex in seq_along(dataMapping$lines)) {
# position correspond to the number of layer lines already added
Expand Down

0 comments on commit aea83b9

Please sign in to comment.