File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1196,11 +1196,10 @@ plot_grid(morley_hist_default,
1196
1196
1197
1197
#### Adding layers to a ` ggplot ` plot object {-}
1198
1198
1199
- What if we want to add onto a ` ggplot ` plot object later in our analysis?
1200
- Do we need to copy and paste the code we wrote previously
1201
- and then add on our new layers after that? No!
1202
- If we stored our ` ggplot ` plot as a named object
1203
- using the assignment symbol (` <- ` ), we can
1199
+ One of the powerful features of ` ggplot ` is that you
1200
+ can continue to iterate on a single plot object, adding and refining
1201
+ one layer at a time. If you stored your plot as a named object
1202
+ using the assignment symbol (` <- ` ), you can
1204
1203
add to it using the ` + ` operator.
1205
1204
For example, if we wanted to add a title to the last plot we created (` morley_hist ` ),
1206
1205
we can use the ` + ` operator to add a title layer with the ` ggtitle ` function.
You can’t perform that action at this time.
0 commit comments