Plot Geoms
You might guess that by substituting geom point() for a different geom function, you’d get a different type of plot. That’s a great guess! In the following
sections, you’ll learn about some of the other important geoms provided in
ggplot2. This isn’t an exhaustive list, but should cover the most commonly
used plot types.
• geom smooth() fits a smoother to the data and displays the smooth and its
standard error.
• geom boxplot() produces a box-and-whisker plot to summarise the distribution of a set of points.
• geom histogram() and geom freqpoly() show the distribution of continuous
variables.
• geom bar() shows the distribution of categorical variables.
• geom path() and geom line() draw lines between the data points. A line plot
is constrained to produce lines that travel from left to right, while paths
can go in any direction. Lines are typically used to explore how things
change over time.


雷达卡



京公网安备 11010802022788号







