Skip to content

Commit

Permalink
grouped plot position guessed automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
kassambara committed Jun 2, 2019
1 parent 8bc0e9a commit 80f198b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/stat_pvalue_manual.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ stat_pvalue_manual <- function(
group2 <- NULL
data <- add_ctr_rows(data, ref.group = ref.group)
mapping <- aes(x = xmin, y = y.position, label = label, group = group2)
if(missing(position) & is_grouping_variable(x))
position <- position_dodge(0.8)
if(missing(position) & !missing(x)){
if (is_grouping_variable(x))
position <- position_dodge(0.8)
}
}
else{
mapping <- aes(x = xmin, y = y.position, label = label)
Expand Down

0 comments on commit 80f198b

Please sign in to comment.