フィルターのクリア

How to change plot background color for some datapoints?

17 ビュー (過去 30 日間)
Rosi Marungu
Rosi Marungu 2016 年 4 月 4 日
コメント済み: Walter Roberson 2020 年 8 月 17 日
I would like to produce a plot as shown below. The feature I am looking are the different background colors for some of the datapoints. How can I do this?
Thank you!

採用された回答

Walter Roberson
Walter Roberson 2016 年 4 月 4 日
You can use rectangular regions with fill(), or you can use rectangle() with a FaceColor . Either way, you can draw those background areas first, or if you draw them after the plot be sure to uistack() them to the beneath the plot lines.
  5 件のコメント
Claire Andreasen
Claire Andreasen 2020 年 8 月 17 日
if you're using a grid, how would you make the grid appear overtop the rectangle?
Walter Roberson
Walter Roberson 2020 年 8 月 17 日
Grids are considered part of an axes. You can have axes appear on top by setting the axes Layer property to 'top' instead of the default 'bottom'

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

その他の回答 (1 件)

Muhammad Usman Saleem
Muhammad Usman Saleem 2016 年 4 月 4 日

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by