diff --git a/R/blandr.draw.r b/R/blandr.draw.r index a860aab..5e7cf17 100644 --- a/R/blandr.draw.r +++ b/R/blandr.draw.r @@ -90,6 +90,7 @@ blandr.draw <- function( method1 , ciShading = ciShading , normalLow = normalLow , normalHigh = normalHigh , + point_size = point_size , overlapping = overlapping , x.plot.mode = x.plot.mode , y.plot.mode = y.plot.mode , diff --git a/R/blandr.plot.ggplot.r b/R/blandr.plot.ggplot.r index 86a8765..258725f 100644 --- a/R/blandr.plot.ggplot.r +++ b/R/blandr.plot.ggplot.r @@ -12,6 +12,7 @@ #' @param ciShading (Optional) TRUE/FALSE switch to plot confidence interval shading to plot, default is TRUE #' @param normalLow (Optional) If there is a normal range, entering a continuous variable will plot a vertical line on the plot to indicate its lower boundary #' @param normalHigh (Optional) If there is a normal range, entering a continuous variable will plot a vertical line on the plot to indicate its higher boundary +#' @param point_size (Optional) Change the size of the points in the plot, default "0.8"' #' @param overlapping (Optional) TRUE/FALSE switch to increase size of plotted point if multiple values using ggplot's geom_count, deafault=FALSE. Not currently recommend until I can tweak the graphics to make them better #' @param x.plot.mode (Optional) Switch to change x-axis from being plotted by means (="means") or by either 1st method (="method1") or 2nd method (="method2"). Default is "means". Anything other than "means" will switch to default mode. #' @param y.plot.mode (Optional) Switch to change y-axis from being plotted by difference (="difference") or by proportion magnitude of measurements (="proportion"). Default is "difference". Anything other than "proportional" will switch to default mode. @@ -56,6 +57,7 @@ blandr.plot.ggplot <- function ( statistics.results , normalLow = FALSE , normalHigh = FALSE , overlapping = FALSE , + point_size = 0.8 , x.plot.mode = "means" , y.plot.mode = "difference" , plotProportionalBias = FALSE , @@ -94,7 +96,7 @@ blandr.plot.ggplot <- function ( statistics.results , # Plot using ggplot ba.plot <- ggplot( plot.data , aes( x = plot.data$x.axis , y = plot.data$y.axis ) ) + - geom_point() + + geom_point(size = point_size) + theme(plot.title = element_text(hjust = 0.5)) + geom_hline( yintercept = 0 , linetype = 1 ) + # "0" line geom_hline( yintercept = statistics.results$bias , linetype = 2 ) + # Bias