Skip to main content
. 2013 Oct 16;2(10):e79. doi: 10.1038/psp.2013.56

Figure 2.

Figure 2

Mapping and setting aesthetics in ggplot2. (a) Variables that are not in the data set are mapped to color and size inside aes, which creates new factor variables on the fly and produce a plot with unwanted legends. (b) Correct settings for color and size. (c) Map the levels of the “drug” variable to color and set size and line type in separate geom calls.