transparent plot

12 ビュー (過去 30 日間)
Ian
Ian 2011 年 4 月 22 日
コメント済み: José-Luis 2014 年 10 月 23 日
Hi, Is there any way to make the dots that appear in a plot transparent? an example of what i would like to do is
plot(x,y, 'color', [1 0 0], 'alpha', 0.5)

採用された回答

Matt Fig
Matt Fig 2011 年 4 月 22 日
Not with a line object, but you can use an old graphics 'trick' to get it done:
% Your data...
x = 1:10;
y = x.^2;
% Now make the 'line' (actually a surface)...
z = zeros(size(x));
S = surface([x;x],[y;y],[z;z],...
'facecol','no',...
'edgecol','interp',...
'linew',2,...
'edgealpha',.2,...
'edgecolor','b');
  3 件のコメント
Jeffrey Girard
Jeffrey Girard 2014 年 10 月 23 日
This worked well for me Ian, thank you. However, I was hoping to plot the dots as circles rather than rectangles. Do you have a trick on how to do so?
José-Luis
José-Luis 2014 年 10 月 23 日
This is a 3-years old thread. Please ask a new question.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by