Setting Matlab line plot grid transparency
22 ビュー (過去 30 日間)
古いコメントを表示
Hello!
Is there a way to adjust the 2D line plot grid transparency/visibility/opacity in Matlab?
Thank you, Uku
0 件のコメント
回答 (3 件)
Walter Roberson
2012 年 7 月 1 日
Sorry, no there is not. There is GridLineStyle and MinorGridLineStyle properties of the axes. I do not recall at the moment whether the LineWidth axes property affects the grid lines. None of those properties can change the transparency.
0 件のコメント
Jerry Gregoire
2013 年 8 月 27 日
編集済み: Jerry Gregoire
2013 年 8 月 27 日
% Try this
% Create an axes in a figure with grid lines
NF = figure;
grid on;
hGridAxes = get(NF, 'children');
% make grid transparent
set(hGridAxes, 'Color', 'none')
% Set the axes parent to the figure that you want to overlay
set(hGridAxes, 'parent', handleOfFigureToOverLay);
You will have to play with the position of the hGridAxes and perhaps the tick labels, but this should get you started.
I have a figure with many axes produced by 'Panel' and needed a grid overlay. This work for me.
2 件のコメント
Walter Roberson
2013 年 8 月 27 日
I think the original poster wanted to be able to set the alpha of the line transparency, not turn the lines off.
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!