필터 지우기
필터 지우기

Setting Matlab line plot grid transparency

조회 수: 22 (최근 30일)
Uku
Uku 2012년 7월 1일
댓글: Jerry Gregoire 2013년 11월 14일
Hello!
Is there a way to adjust the 2D line plot grid transparency/visibility/opacity in Matlab?
Thank you, Uku

답변 (3개)

Walter Roberson
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.

Uku
Uku 2012년 7월 1일
Thank you for the answer! I think this feature should be integrated into future program releases. In scientific papers color costs, black and white plots can become messy with very sharp and distinct grid lines.
Regards, U.

Jerry Gregoire
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
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.
Jerry Gregoire
Jerry Gregoire 2013년 11월 14일
Yes. You are correct.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by