Graphics Reference
In-Depth Information
# Keep 1 out of every 5 values in x and y, and 1 in 2 values in z
keepx <- every_n(unique(isabel$x), by = 5 )
keepy <- every_n(unique(isabel$y), by = 5 )
keepz <- every_n(unique(isabel$z), by = 2 )
isub <- subset(isabel, x %in% keepx & y %in% keepy & z %in% keepz)
ggplot(isub, aes(x = x, y = y)) +
geom_segment(aes(xend = x + vx / 50 , yend = y + vy / 50 , colour = speed),
arrow = arrow(length = unit( 0.1 , "cm" )), size = 0.5 ) +
scale_colour_continuous(low = "grey80" , high = "darkred" ) +
facet_wrap( ~ z)
Figure 13-24. Vector field of wind speeds faceted on z
See Also
If you want to use a different color palette, see Using a Manually Deined Palette for a Continu-
ous Variable .
Search WWH ::




Custom Search