Setting 'FaceAlpha'<1 for a patch object causes x- and y- axes of the plot to dissapear. Why and how can this be corrected?
Ältere Kommentare anzeigen
Hello everyone,
have any of you ever plotted a 2D patch object and noticed that upon altering its 'FaceAlpha' value below 1, it causes the x- and y-axes of the plot to disappear? Just to clarify, by x- and y- axes I mean the horizontal and vertical lines of the plot, respectively, not the axes object where the patch is plotted.
Here is an example of what I talking about:
% Plot a simple patch object
x=[0 1 1 0 0];
y=[0 0 1 1 0];
figure('color','w')
ha1=subplot(1,2,1);
ha2=subplot(1,2,2)
h=fill(x,y,'g');
% DO the same as above, but alter the FaceAlpha value of the patch
figure('color','w')
ha1=subplot(1,2,1);
ha2=subplot(1,2,2);
h=fill(x,y,'g');
set(h,'FaceAlpha',0.5)
Note that changing the transparency of the patch in the second figure caused the x- and y- axes (i.e., horizontal and vertical lines) to disappear in ha1 and ha2.
Does anyone know why this happens, and how can it be corrected?
Thank you!
PS - Not sure if its relevant, but I am using R2013a version of Matlab.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!