Matlab legend show opaque plot symbols when plot symbols are semi-transparent.
Show older comments
HI, I am trying to create a scatter plot cloud, of which I set the points are all "filled" and semi-transparent by setting "MarkerFaceAlpha=0.1". However, when I export the legend automatically, the point symbols are also the same semi-transparent and it is hardly can be seen in legend. Do we have an easy way to switch on/off the MarkerFaceAlpha?
Here is the code:
figure()
% plot the AIS cargo and fishing data
scatter(X1,Y1,16, [0.9290, 0.6940, 0.1250],"filled",MarkerFaceAlpha=0.1,DisplayName='A')
hold on
scatter(X2, Y2,16, [0 0.4470 0.7410],"filled",MarkerFaceAlpha=0.1,DisplayName='B')
hold off
legend(Location="southwest",Box="off")
Accepted Answer
More Answers (0)
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!