force grid to be on top of patch

5 ビュー (過去 30 日間)
Mohammad
Mohammad 2020 年 9 月 25 日
コメント済み: Walter Roberson 2020 年 9 月 26 日
I'm referring to this question:
How can I add grid to the figure which is not covered by the patch color?

採用された回答

Walter Roberson
Walter Roberson 2020 年 9 月 25 日
If you mean the kind of grid you get from "grid on", then set the axes "Layer" property to 'top'
  2 件のコメント
Mohammad
Mohammad 2020 年 9 月 25 日
編集済み: Mohammad 2020 年 9 月 25 日
Thanks. But it brings the grid on top of the curves as well (white lines on the curves). I want the grid to be behind the curves but still not covered by the patch color.
Walter Roberson
Walter Roberson 2020 年 9 月 26 日
Use two axes in the same position. The one with the patch is drawn first and has normal background color and grid turned on. Anything that should appear above the grid goes onto the second axes, which should have background color 'none'
In theory yyaxis can be used for this purpose, if you turn axes visible off for the right axes and grid on for the left axes (with the patch)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by