Open PLCunningham opened 2 years ago
Dear PLCunningham,
Thanks for your issue.
Q1: How to change the axis scales and add a heading? A1: Using 'ggtendline' package together with 'ggplot2' package, the 'xlim', 'ylim', and 'ggtitle' functions in ggplot2 worked, for example:
library(ggplot2) #Loading ggplot2 package first
library(ggtrendline)
x <- c(1, 3, 6, 9, 13, 17)
y <- c(5, 8, 11, 13, 13.2, 13.5)
ggtrendline(x, y, "exp2P") + xlim(0, 20) + ylim(0, 30) + ggtitle("Add a heading using 'ggplot2' package")
Q2: How to move or remove the y, r^2 or p values? A2: For move, using 'eq.x', 'eq.y', 'rrp.x', and 'rrp.y' functions in our 'ggtrendline' package; and for remove, using 'show.eq', 'show.Rsquare' and 'show.pvalue' in our 'ggtrendline' package.
library(ggtrendline)
x <- c(1, 3, 6, 9, 13, 17)
y <- c(5, 8, 11, 13, 13.2, 13.5)
ggtrendline(x,y, "exp2P", eq.x = 9, eq.y = 18, rrp.x = 9, rrp.y = 16, eSize = 5)
BTW, you can type ??ggtrendline
to see all Arguments built in our 'ggtrendline' package.
Best regards, Mei
How does one change the axis scales and add a heading when the normal x/ylim and main functions do not work? Also how do you move or remove the y, r^2 or p values that automatically appear in the top left area of the plot?