Description
Hi,
I’m encountering an unexpected error when trying to use sec_axis() in a simple plot. I’ve checked the documentation and some previous issues, and I haven’t found anything that would suggest a mistake in the code below. That’s why I’m wondering if it might be a bug.
library(ggplot2)
df <- data.frame(x = 1:10, y = (1:10) * 2)
ggplot(df, aes(x = x, y = y)) +
geom_line() +
scale_y_continuous(
name = "Primary Axis",
sec.axis = sec_axis(~ . / 2, name = "Secondary Axis")
)
Error message:
Error in train_continuous(x, self$range, call = call) :
argumento não utilizado (call = call)
What I’ve tried:
I updated ggplot2 using install.packages("ggplot2")
Restarted the R session
Removed and reinstalled the package
Verified I’m using version 3.5.2
Still, the error persists. I understand this could be due to something specific in my R setup, but since the example is minimal and uses only base R + ggplot2, I thought it was worth reporting in case others are affected.
Thanks in advance for your time and for all the work you do on the package!