Skip to content

Instantly share code, notes, and snippets.

@cimentadaj
Created August 16, 2016 22:01
Show Gist options
  • Select an option

  • Save cimentadaj/42ddee151ac7b5bbbbfc002551918d3f to your computer and use it in GitHub Desktop.

Select an option

Save cimentadaj/42ddee151ac7b5bbbbfc002551918d3f to your computer and use it in GitHub Desktop.
library(scales) # install.packages("scales") in case you don't have it
m + scale_y_continuous(trans = log2_trans(), # choose the transformation
breaks = trans_breaks("log2", function(x) 2^x), # the number of breaks
labels = trans_format("log2", math_format(2^.x))) # and the labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment