-1

In a plot with points, I also have some curves. I used the curve function to get the exponential function in:

curve (fishA$parameterB * (x ^ fishA$parameterAlpha), 
       from = 50, to = 80, n = 100, add = TRUE)

The curve isn't smooth. How do I improve it? Maybe smooth is not the right word, but the curve is not nice.

A5C1D2H2I1M1N2O1R2T1
  • 190,393
  • 28
  • 405
  • 485
Marnix de Zeeuw
  • 61
  • 1
  • 1
  • 4

2 Answers2

2

You didn't give the paramter values, so I cannot reproduce your output. My guess is that you need to increase the value of n in the curve function call.

Roland
  • 127,288
  • 10
  • 191
  • 288
0

I had some similar problem. I escaped just using excel to smooth the data and added the smoothed line to the dataframe in R. Anyway, the panel.tskernelm (lattice extra) may help you.

FraNut
  • 676
  • 1
  • 11
  • 22