sermomon
sermomon

Reputation: 317

Plot a user-defined equation using R base plots

I would like to plot an experimental equation using the base graphics module of R. How can I do it?

The equation is as follows: Y = 0.000028684X^2.907552726

Y=0.000028684*X^2.907552726

Upvotes: 0

Views: 53

Answers (1)

Allan Cameron
Allan Cameron

Reputation: 173793

You can use the text function:

plot(function(X) 0.000028684*X^2.907552726, ylab = 'Y', xlab = 'X',
     xlim = c(0, 100))
text(20, 15, quote(Y == paste('0.000028684')*X^2.907552726))

enter image description here

Upvotes: 3

Related Questions