Relative Content

Tag Archive for rtime-serieshighlight

Highlight area in a time series when y is greater than a threshold value and a range of values

I need to highlight the areas in a time series plot where variable 1 is greater than 28.3m and in a separate plot where variable 2 is between 335 and 390 and then stack these plots on top of each other in a similar fashion to the plots in this post. (https://stackoverflow.com). The highlighted areas may not align in the two plots for my data (not a problem) but I need the time series on the x axis to align for both plots. My code is highlighting areas where the values are less than the threshold or range specified. I haven’t been able to apply the code in the attached link either. I would be very grateful for any help.

Highlight area in a time series where x is greater than specified value

I’m trying to highlight the areas in a time series plot where the river level is greater than 28.3m and in a separate plot where the SpCond varies between 335 and 390uS and then stack these plots on top of each other in a similar fashion to the plots in this post. Automatic way to highlight parts of a time series plot that have values higher than a certain threshold? . The greyed areas may not align in the two plots for my data (not a problem) but I need the time series on the x axis to align for both plots. Unfortunately I’ve been unable to apply the code in the post to my dataset and would be very grateful for any assistance.