Hi,
When I read MATLAB documentation about transparency it refers to 3-D objects. Is it possible to make part of a 2-D object (eg. a normal distribution plot) transparent?
Many thanks,
Rob

 채택된 답변

the cyclist
the cyclist 2011년 7월 3일

0 개 추천

Yes. As a general rule, look for object properties that have a "alpha" as part of their name (e.g. FaceAlpha) to adjust the transparency.
If you post some code, I could try to be more specific on how to adjust transparency for a given object you are displaying.

댓글 수: 2

Rob Bain
Rob Bain 2011년 7월 3일
Many thanks, Cyclist. I don't actually have the code (yet). I have a young programmer working with me - and he has done a very good job. It's just this last bit he is struggling with (fading the colour to transparent). I don't want to undermine his confidence, he is trying to work this out, but I might come back to you later if you don't mind (if we're still stuck). Thanks again, Rob
The cyclist. I too am trying to obtain transparency for 2D plots. This is a sample code :
clc;
clear all;
x = linspace(0,10);
y1 = sin(x);
y2 = sin(5*x);
y3 = sin (0.5*x);
figure
subplot(2,1,1);
h = plot(x,y1)
hold on;
subplot(2,1,1);
h2 = plot(x,y3)
hold on;
subplot(2,1,2);
h1 = plot(x,y2)
Can you help me how to do it?

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

추가 답변 (0개)

카테고리

제품

질문:

2011년 7월 3일

댓글:

2014년 8월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by