I am trying to write a code that I wrote with a basic graphics package in R to ggplot.
The graph I obtained using the basic graphics package is as follows:

I was wondering whether this type of graph is possible to create in ggplot2. I think we could create this kind of graph by using panels but I was wondering is it possible to use faceting for this kind of plot. The major difficulty I encountered is that maximum and minimum have common lengths whereas the observed data is not continuous data and the interval is quite different.
Any thoughts on arranging the data for this type of plot would be very helpful. Thank you so much.
Jdbaba,
From your comments, you mentioned that you’d like for the
geom_pointto have just the.in the legend. This is a feature that is yet to be implemented to be used directly inggplot2(if I am right). However, there’s a fix/work-around that is given by@Anikoin this post. Its a bit tricky but brilliant! And it works great. Here’s a version that I tried out. Hope it is what you expected.The idea is to first create a plot with all necessary attributes set in the aesthetics section, plot what you want and then change settings manually later using
scale_._manual. You canunsetlines by a0inscale_linetype_manualfor example. Similarly you canunsetpoints for lines usingNAinscale_shape_manual. Here, the first two values are forgroup1=maximum and minimumand the last is forobserved. So, we setNAto the first two formaximumandminimumand set0tolinetypeforobserved.And this is the plot: