0

I generated one data

nitrogen<- c(0,40,80,120,160,260)
yield <- c(8.4,9.8,10.8,12.5,11.1,12.7)
dataA<- data.frame(nitrogen, yield)

and I'd like to see this data as quadratic-plateau model. So I used nlsplot() code.

install.packages("easynls")
library(easynls)
nlsplot(dataA, model=4)

enter image description here

The model equation is covered in the graph. I'd like to see the full model equation about this quadratic-plateau model.

Could you let me know how to do it?

Always many thanks!!

Jin.w.Kim
  • 599
  • 1
  • 4
  • 15
  • Look at `?nlsplot` for help - there is a `position = ` argument to control the location of the equation. Does that help? – neilfws Feb 19 '23 at 22:12
  • Simply drag your plotting window to make it larger. Your equation should appear if your plotting area is large enough to accommodate it. – Allan Cameron Feb 19 '23 at 22:32

1 Answers1

1

One solution could be using par() function to adjust the plot size and font size arguments within par() and then run nlsplot():

# change the font size for the plot
par(cex.lab = 1.5, cex.axis = 1.5, cex=1.2)

# plot the data with formula
nlsplot(dataA, model = 4)

enter image description here Now I change the font size of the formula to 0.8 to cover better.You can play with the par() arguments to adjust your plot.

par(cex.lab = 1, cex.axis = 1, cex=0.8)

nlsplot(dataA, model = 4)

enter image description here

S-SHAAF
  • 1,863
  • 2
  • 5
  • 14