Showing equation of nls model with ggpmisc

Create issue
Issue #10 resolved
MYaseen208 created an issue

R package ggpmisc can be used to show equation of lm model and poly model on ggplot2 (See here for reference). Wonder how to show nls model equation results on ggplot2 using ggmisc. Below is my MWE. Any help will be highly appreciated. Thanks

library(ggpmisc)
args <- list(formula = y ~ k * e ^ x,
             start = list(k = 1, e = 2))
ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  stat_fit_augment(method = "nls",
                   method.args = args)

Comments (1)

  1. Log in to comment