plotbiomes icon indicating copy to clipboard operation
plotbiomes copied to clipboard

Customisation of the axis - precipitation from cm to mm

Open ajpelu opened this issue 7 months ago • 1 comments

hi @valentinitnelav Thanks for your pkg. Is there any way to customize the axis (change the labels of the axis, or the units)? For instance, I'm interested in plot the precipitation axis in mm not in cm. Is there any way to do it? I tried this, but it does not work

library(scales)
trans_mm = scales::trans_new("mm", \(x) x*10, \(x) x/10) # Custom transformation
whittaker_base_plot() + scale_y_continuous(trans = trans_mm)

I got the message:

Scale for y is already present.
Adding another scale for y, which will replace the existing scale.

Any advice? Thanks

ajpelu avatar Jul 24 '24 18:07 ajpelu