Relative Content

Tag Archive for rggplot2

Keep all colors in legend for subset of data – ggplot

I want to generate a plot which keeps all the colors in the legend, even for a subset of the data. When i create a reproducible example it works, and i am going out of my mind trying to work out what i am missing. Below is my working reproducible example and a dput of my code that won’t work. Appreciate any help correcting this.

How to plot temperature data with low and high geom_line?

Following this question (How to use average value in geom_line?), how can I change this graph with two geom_lines: one representing the averaged low temperatures from 20:00 to 08:00 and the other representing the averaged high temperatures from 08:01 to 19:59?