In the following graphic, the values in the x axis represent distances, where I coloured by group, so for group A the distances are represented to the right, while for group B the distances are represented to the left (had to make them negative to plot like this). Is there a way to represent the values to the left of 0 as positive (absolute value)? To be clear, instead of -20, -40, -60, -80, I would like to show, to the left of 0: 20, 40, 60 and 80.

You can pass the abs() function to the labels argument of scale_x_continuous():
... + scale_x_continuous(labels = abs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With