Hi all, I was quite intrigued by George's question, for I thought this might be a problem faced by many. The solution attached is only useful for a monotonically increasing x vector, a paired vector of y values, and a criterial value above which a polygon will be displayed. More work would needed for curves that are above the criterial value at the beginning or end, and a corresponding argument to fill the area _below_ the criterial value. If it is useful, I can probably do a bit more work on it.
Jim On Fri, Mar 3, 2023 at 11:58 PM John Kane <jrkrid...@gmail.com> wrote: > > As Peter says, the list is very cautious about what types of files it > allows. A handy way to supply some sample data is the dput() function. In > the case of a large dataset something like dput(head(mydata, 100)) should > supply the data we need. Just do dput(mydata) where *mydata* is your data. > Copy the output and paste it here. > > On Wed, 1 Mar 2023 at 09:58, PIKAL Petr <petr.pi...@precheza.cz> wrote: > > > Hallo > > > > Excel attachment is not allowed here, but shading area is answered many > > times elsewhere. Use something like . "shading area r" in google. > > > > See eg. > > https://www.geeksforgeeks.org/how-to-shade-a-graph-in-r/ > > > > Cheers Petr > > > > -----Original Message----- > > From: R-help <r-help-boun...@r-project.org> On Behalf Of George Brida > > Sent: Wednesday, March 1, 2023 3:21 PM > > To: r-help@r-project.org > > Subject: [R] Shaded area > > > > Dear R users, > > > > I have an xlsx file (attached to this mail) that shows the values of a > > "der" series observed on a daily basis from January 1, 2017 to January 25, > > 2017. This series is strictly positive during two periods: from January 8, > > 2017 to January 11, 2017 and from January 16, 2017 to January 20, 2017. I > > would like to plot the series with two shaded areas corresponding to the > > positivity of the series. Specifically, I would like to draw 4 vertical > > lines intersecting the x-axis in the 4 dates mentioned above and shade the > > two areas of positivity. Thanks for your help. > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních > > partnerů PRECHEZA a.s. jsou zveřejněny na: > > https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information > > about processing and protection of business partner’s personal data are > > available on website: > > https://www.precheza.cz/en/personal-data-protection-principles/ > > Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou > > důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení > > odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any > > documents attached to it may be confidential and are subject to the legally > > binding disclaimer: https://www.precheza.cz/en/01-disclaimer/ > > > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > > -- > John Kane > Kingston ON Canada > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.