在Matlab中绘制三角矩阵的网格
我一直试图弄清楚如何从 Matlab 的 3d 图中“隐藏”三角矩阵的无用部分。
我尝试在图表的该部分上方绘制一个网格
'EdgeAlpha', 1, 'FaceAlpha', 1,'FaceColor','w','EdgeColor','none'
,但没有帮助。我该怎么做呢?
半工作的唯一方法是使用色标,但它并没有完全起作用,加上我需要黑白 eps,即使它原本看起来是白色的,它也会将颜色显示为黑色......
这是我的最后的希望;) 芭芭拉
I have been trying to figure out how to "hide" the useless part of the triangular matrix from my 3d plot in Matlab.
I have tried drawing a mesh just above that part of the graph with
'EdgeAlpha', 1, 'FaceAlpha', 1,'FaceColor','w','EdgeColor','none'
but it does not help. How should I do it instead?
The only method the semi-worked is using the color scale, but it did not work all the way, plus I need the black and white eps's, which will show the color as black even if it looks white originally...
This is my last hope ;)
Barbara
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短回答:将“无用”数据替换为 nan 值,因为 MATLAB 不会绘制 nan 数据值。
将 nan 值插入矩阵的另一半应该可以解决问题。请参阅下面的示例 - 它很笨重,但应该给出想法。我选择乘以 nan,如图所示,但我想到了其他六件事。
Short answer: replace "useless" data with the value nan because MATLAB does not plot data values that are nan.
Inserting nan values into the other half of the matrix should do the trick. See the example below - it's clunky, but should give the idea. I chose to multiply by nan, which I attained as shown, but there are half a dozen other things that came to mind.