Related Articles
gf_point()
The gf_point() function can be used to create a scatterplot, or to plot a specified point, such as a specific value along the x-axis. Example 1: gf_point( Thumb ~ Height , data = Fingers , size = 2 ) Example of output from running the code above: ...
gf_lm()
The gf_lm() function overlays the best-fitting regression line on a scatter plot when chained onto gf_point(). Example: # adds a regression line gf_point(Thumb ~ Height, data = Fingers) %>% gf_lm( color = "orange", size = 2 )
gf_jitter()
The gf_jitter() function will generate a jitter plot. A jitter plot is a point plot (similar to a scatter plot, such as gf_point()) but the points are moved slightly ("jittered") so that they do not overlap as much. This can help make it easier to ...
What are the boxes and whiskers in a boxplot?
What are the boxes and whiskers in a boxplot? We use boxplots to show the distribution of data mainly through four quartiles (Q1, Q2, Q3, Q4). The boxplot has two whiskers (Q1, Q4), two smaller boxes (Q2, Q3) and a larger central box (Q2, Median, Q3) ...
gf_vline()
The gf_vline() function will add a vertical line onto a plot. You can plot the line by referencing a value in a data frame (Example 1), or by specifying the point along the axis where the line should run through (Example 2). Example 1: # Save the ...