Octave中的alpha函数尚未实现

时间:2015-08-31 10:53:24

标签: matlab octave

我试图从this SO answer重现真正酷的情节。您可以在我的Saturn Fiddle上运行代码。我收到了错误

  

alpha尚未在Octave中实现

如何在Octave中实现透明度以重现相同的情节?谢谢!

% Code adapted from @rayryeng
% https://stackoverflow.com/questions/32278788/plotting-3d-in-matlab/

vert = [0 1 0; 1 0 0; 0 0 1];
patch('Vertices', vert, 'Faces', 1:3, 'FaceColor', 'cyan')
view(3)
set(gca, 'xdir', 'reverse')
set(gca, 'ydir', 'reverse')
grid
% alpha('color') %%Not yet implemented in Octave :(
[X,Y] = meshgrid(0:(1/6):1);
Z = 1 - X - Y;
Z(Z < -0.01) = NaN;
hold on;
plot3(X, Y, Z, 'b.', 'MarkerSize', 32);
text(0.3,0.3,0.4, 'NE');
line([1/2 1/3], [1/2 1/3], [0 1/3], 'color', 'black');
xlabel('R'); ylabel('P'); zlabel('S');
print("MyPNG.png", "-dpng", "-r60")

0 个答案:

没有答案