Skip to content

Instantly share code, notes, and snippets.

@cimentadaj
Created August 16, 2016 19:28
Show Gist options
  • Save cimentadaj/d3f89a190cd269699976606c1b0bd08c to your computer and use it in GitHub Desktop.
Save cimentadaj/d3f89a190cd269699976606c1b0bd08c to your computer and use it in GitHub Desktop.
# Manual trans
ggplot(housing, aes(x=sqrt(Land.Price.Index), y=sqrt(Home.Price.Index))) + geom_point()
# Scale trans
ggplot(housing, aes(x=Land.Price.Index, y=Home.Price.Index)) + geom_point() +
scale_x_sqrt() +
scale_y_sqrt()
# Coordinate trans
ggplot(housing[], aes(x=Land.Price.Index, y=Home.Price.Index)) + geom_point() +
coord_trans(x= "sqrt", y ="sqrt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment