hadley / ggplot2-book

ggplot2: elegant graphics for data analysis
https://ggplot2-book.org/
1.55k stars 678 forks source link

Scales Transformations (paragraph10.1.7) not correct anymore #396

Open mhurk opened 5 months ago

mhurk commented 5 months ago

The code showing the reciprocal transformation (§ 10.1.7) is not correct anymore. As of R4.3.3 a bug preventing the axis labels to be displayed is solved.

# convert from fuel economy to fuel consumption   
ggplot(mpg, aes(displ, hwy)) + 
  geom_point() +  
  scale_y_continuous(trans = "reciprocal")

This is the output of R4.3.3:

par10_1_7