Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
そのため、MATLABプロットのグリッドの(通常の)黒色を維持しようとしていますが、x軸とy軸の色を白色に変更したいと思います。通常のset(gca、'xcolor'、'w');を実行すると、(yについても同じです)、グリッド全体が白に変わりますが、これは私が望んでいることではありません。
これを行う簡単な方法はありますか?
ここでコードを確認しましたが、あまり役に立ちませんでした。
ありがとう。
簡単なハックとして、必要な色で軸を再描画し、グリッドをオフにすることができます。
plot(rand(10,1)) grid on ax = copyobj(gca, gcf); set(ax,'color','none','xgrid','off', 'xcolor','w', 'ygrid','off', 'ycolor','w')
エレガントではありませんが、機能します: