figure背景颜色多种设置。
14 ビュー (過去 30 日間)
古いコメントを表示
新锦江娱乐游戏网址【微8785092】
2023 年 5 月 21 日
回答済み: 新锦江娱乐游戏账号注册【微8785092】
2023 年 5 月 21 日
请问我怎么在matlab里面,把figure的背景,按照范围设置成不同的颜色啊,就像这个图里面显示似的,这个图我用的是rectangle,但是这样把网格给挡住了

0 件のコメント
採用された回答
新锦江娱乐游戏账号注册【微8785092】
2023 年 5 月 21 日
给你举个例子
rectangle( 'Position', [ 1, 2, 5, 10 ], 'FaceColor', [ 0, 0.5, 0.5 ], 'EdgeColor', 'b', 'LineWidth', 3 );
set( gca, 'XGrid', 'on', 'Layer', 'top' );
set( gca, 'YGrid', 'on', 'Layer', 'top' );
这样就可以把网格线设置到 rectangle 所绘图形图层的上面了
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!