Old-school plots are the only way of plotting the exact nls model I need, so I plot a useful graph. It is, though, full of text and elements (like lines) on top since I wrote the code for each element separately. I need to be able to name my plot as one single graph/image/plot.
The code looks like this:
plot(x~y,data=df, lwd=2, col = c(1,2,3))[Generation], pch=c(15,16,17) [Generation])
axis(1,at=c(2,4, 6),cex.axis=1.6)
axis(2,at=c(0, 5, 10, 15, 20), las=1,cex.axis=1.6)
curve(vbT(x,Linf=coef(VB)),col="black",add=TRUE, lty=1)
segments(4.5,10, 4.5,0, col=rgb(0,0,1,alpha=0.8), lwd=c(1))
text(2, 10, "Group A", col=rgb(0.1,0.4,0.45, alpha=1), cex = 1, pos=1)
It has more elements, but this gives the idea. It's just longer, so the number of lines doesn't change the problem.
I tried with all kind of parentheses and arrows:
Plot1<- {My code... all the lines}
I tried plot.default and some other functions. I just can`t manage to name all of this as one "image" or plot. I am very used to ggplot now, but I must use basic r plots again. Because I am trying to graph together with some ggplots using the function ggarrange.
Thanks for your help!!!