main.r152 chars7 lines
The ggplot()
function initializes the ggplot object, and specifies the dataset df
and the aesthetic mappings defined inside aes()
. The function geom_point()
creates the scatter plot, and the size
aesthetic specifies the column z
for which the point sizes should be proportional.
This code will create a scatter plot with the x values on the x-axis, y values on the y-axis and the size of the points represented by the values in column z
.
gistlibby LogSnag