Skip to content

Instantly share code, notes, and snippets.

@SolomonMg
Last active January 13, 2019 02:53
Show Gist options
  • Select an option

  • Save SolomonMg/90bdec67f3e69d0de52d6cc5c86f7b70 to your computer and use it in GitHub Desktop.

Select an option

Save SolomonMg/90bdec67f3e69d0de52d6cc5c86f7b70 to your computer and use it in GitHub Desktop.
p = ggplot( data=diamonds, aes(carat, price, colour=clarity)) +
geom_point(alpha = 0.5, size = .75, position='jitter') +
scale_colour_brewer(type = 'div',
guide = guide_legend(title = NULL, reverse=T,
override.aes = list(alpha = 1))) +
scale_x_continuous(trans=cubroot_trans(), limits = c(0.2,3),
breaks = c(0.2, 0.5, 1, 2, 3)) +
scale_y_continuous(trans=log10_trans(), limits = c(350,15000),
breaks = c(350, 1000, 5000, 10000, 15000)) +
theme_bw() + theme(legend.key = element_blank()) +
ggtitle('Price (log10) by Cubed-Root of Carat and Color')
p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment