 changed status to open
Issue #4
resolved
The following MWE distills my experience using eq.x.rhs
with stat_poly_eq
. Perhaps I understand it incorrectly:
library(dplyr) library(ggplot2) library(ggpmisc) formula < y~x set.seed(1234) data.frame(indep=10^(rnorm(1000))) %>% mutate(dep=10^(2.5 * log10(indep) + 0.6666 + rnorm(length(indep)))) %>% ggplot(aes(indep,dep)) + geom_point() + scale_x_log10() + scale_y_log10() + geom_smooth(method = "lm", formula = formula) + ggpmisc::stat_poly_eq(aes(label = ..eq.label..), eq.with.lhs = "plain(log)[10](italic(y))~`=`~", eq.x.rhs = "ANYTHING", formula = formula,parse=TRUE) sessionInfo(package='ggpmisc') # ... # other attached packages: # [1] ggpmisc_0.2.13 # ...
(for those following at home, the equation reads 'log_10(y) = 0.683 + 2.56 x', where I expect the 'x' to be substituted.
Comments (3)

repo owner 
repo owner  marked as major
Fix will be available in a few hours.

repo owner  changed status to resolved
Resolved.
library(dplyr) library(ggplot2) library(ggpmisc) formula < y~x set.seed(1234) data.frame(indep=10^(rnorm(1000))) %>% mutate(dep=10^(2.5 * log10(indep) + 0.6666 + rnorm(length(indep)))) %>% ggplot(aes(indep,dep)) + geom_point() + scale_x_log10() + scale_y_log10() + geom_smooth(method = "lm", formula = formula) + ggpmisc::stat_poly_eq(aes(label = ..eq.label..), eq.with.lhs = "plain(log)[10](italic(y))~`=`~", eq.x.rhs = "~italic(z)", formula = formula,parse=TRUE)
 Log in to comment
Tested and confirmed as bug.