Before presenting the actual data, I would like to make a graph identical to the graph with the data, but then without the data points. This helps me explain how to interpret such a plot without distracting the audience with the actual data that will be in the plot.
So in the code below I would like to exchange geom_point()for geom_blank(). No problems.
However, it also removes color and size information from the legends that the chart code creates. Is there any way to get this back?
ggplot(vas, aes(x=time, y=pain, colour=light.color, size=light.intensity)) +
geom_blank() +
facet_wrap(~ppno) +
scale_colour_manual(values=cols) +
scale_y_continuous(name="VAS Pain (a.u.)") +
scale_x_continuous(name="Time (minutes)")
How to return the color display to legend(s)? Now they display only the values โโof different levels of a certain parameter (color or size), but not the actual graphic element (color or size of a point) that corresponds to a certain level.