Skip to content

Conversation

wibeasley
Copy link
Contributor

in this specific scenario, they're the same, but I think using coord_cartesian() (which zooms) instead of xlim() (which truncates) is a better template for readers to copy & paste into their own R files. Some of them may not be aware of the difference.

  1. http://rstudio-pubs-static.s3.amazonaws.com/209392_437ec4da7fa2432d831320f3591e7491.html
  2. https://www.r-bloggers.com/ggplot2-axis-limit-gotchas/
  3. https://stackoverflow.com/questions/25685185/limit-ggplot2-axes-without-removing-data-outside-limits-zoom

in this specific scenario, they're the same, but I think using `coord_cartesian()` (which zooms) instead of `xlim()` (which truncates) is a better template for readers to copy & paste into their own R files.  Some of them may not be aware of the difference.

1. http://rstudio-pubs-static.s3.amazonaws.com/209392_437ec4da7fa2432d831320f3591e7491.html
1. https://www.r-bloggers.com/ggplot2-axis-limit-gotchas/
1. https://stackoverflow.com/questions/25685185/limit-ggplot2-axes-without-removing-data-outside-limits-zoom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant