Skip to content

Commit 43dc43c

Browse files
committed
Change to scale_linewidth instead of scale_size to remove plotting warning
1 parent 5311dbc commit 43dc43c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

episodes/07-vector-shapefile-attributes-in-r.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ ggplot() +
345345
geom_sf(data = lines_HARV, aes(color = TYPE, linewidth = TYPE)) +
346346
scale_color_manual(values = road_colors) +
347347
labs(color = 'Road Type') +
348-
scale_size_manual(values = line_widths) +
348+
scale_linewidth_manual(values = line_widths) +
349349
ggtitle("NEON Harvard Forest Field Site",
350350
subtitle = "Roads & Trails - Line width varies") +
351351
coord_sf()
@@ -391,7 +391,7 @@ Now we can create our plot.
391391
```{r harv-path-line-types, fig.cap="Roads and trails in the area with different line thickness for each type of paths."}
392392
ggplot() +
393393
geom_sf(data = lines_HARV, aes(linewidth = TYPE)) +
394-
scale_size_manual(values = line_width) +
394+
scale_linewidth_manual(values = line_width) +
395395
ggtitle("NEON Harvard Forest Field Site",
396396
subtitle = "Roads & Trails - Line width varies") +
397397
coord_sf()

0 commit comments

Comments
 (0)