How drawing a rectangle in a semilog plot ?
조회 수: 1 (최근 30일)
이전 댓글 표시
I try to draw a transparent rectangle in a semilog plot,
With the function fill and the propertie 'FaceAlpha" it work with a linear plot
but don't work in a semilogx plot !!!
more over, I don't find help about 'FaceAlpha' properties.
an example:
clear all;
close all;
c=[0.6 0 1];
figure;
hold on;
plot(cumsum(ones(1,100)),0.25*cumsum(ones(1,100)),'r');
fill([1 1 50 50], [0 10 10 0],c, 'FaceAlpha', 0.4,'EdgeColor','none');
grid on;
figure;
hold on;
set(gca,'XScale','log');
plot(cumsum(ones(1,100)),0.25*cumsum(ones(1,100)),'r');
fill([1 1 50 50], [0 10 10 0],c, 'FaceAlpha', 0.4,'EdgeColor','none');
grid on;
댓글 수: 0
답변 (1개)
Walter Roberson
2015년 8월 9일
Unfortunately you will not be able to do transparency with log plots (unless the situation changed as of R2014b): http://www.mathworks.com/matlabcentral/newsreader/view_thread/241372
fill() is documented as creating patch() objects and the fill documentation references patch properties which defines FaceAlpha
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!