Differences in zooming or scaling in ggplot.

Either scale_y_continuous() or coord_cartesian() can be used but they work in slightly different way.
scale_y_continuous (or scale_x_continuous) will drop data which are out of the range, while coord_cartesian() won’t. It does not affect the plot if the plot is drawn only with the given data. However, if the plot includes processed data by ggplot, such as smoothing or histogram, the result may not the same.

http://had.co.nz/ggplot2/coord_cartesian.html

Differences in zooming or scaling in ggplot Either…
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *