Shade with different colors portions of figure based on data

1 回表示 (過去 30 日間)
Robert
Robert 2018 年 1 月 25 日
コメント済み: Robert 2018 年 2 月 13 日
Hello,
Wondering if anyone could help me with this...
I do have a time-series (Data attached) with positive and negative values and want to create a similar figure as the one below (it was created using R). Looking to do the following:
Plot data having x = Data attached (column 1) vs y = Data attached (column 2)
1) Plot time-series with red dots for values >0 and blue dots for values <0
2) Add a background color and be able to choose transparency
3) Add a red vertical band, on background, to data >=1.5 and be able to choose transparency
4) Add a blue vertical band, on background, to data <=1.5 and be able to choose transparency
5) Add the trend of the positive values as a red line
6) Add the trend of the negative values as a blue line
Thanks!

採用された回答

Chetna Jain
Chetna Jain 2018 年 2 月 13 日
Hi,
I tried creating a similar figure in MATLAB using the data you provided. I have attached the file. Let me know if it helped. :)
  1 件のコメント
Robert
Robert 2018 年 2 月 13 日
Thank you so much Chetna, it looks great, very appreciated!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by