如何在Matlab中使用scatter3图在同一图中绘制等值面? [英] How to draw an isosurface in the same figure with a scatter3 plot in matlab?

查看:437
本文介绍了如何在Matlab中使用scatter3图在同一图中绘制等值面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个3D卷和一个3D点云.如何在不覆盖散布图的情况下绘制点云以及体积的isosurface?使用patch绘制等值面总是会擦掉scatter3图.

I have a 3D volume and a 3D point cloud. How can I draw the point cloud, along with an isosurface of the volume, without overwriting the scatter plot? Using patch to draw the isosurface always wipes away the scatter3 plot.

推荐答案

可以尝试一些方法.

  1. 首先使用修补程序绘制表面. (h = patch(...),然后设置hold on)

使补丁为半透明.这将使您看到分散项是否仍然存在,只是被隐藏了.它还告诉渲染器所有东西都需要绘制,这可以防止某些图形错误.

Make the patches semi-transparent. This will let you see if the scatter items are still there, just hidden. It also tells the renderer that everything needs to be plotted, which can prevent some sorts of graphics bugs.

set(h,'faceAlpha',0.5)

尝试使用plot3而不是scatter3.这不允许您更改单个标记的大小或颜色,但是在Matlab上要容易得多.即使您需要scatter3功能,也值得尝试作为调试步骤.

Try using plot3 instead of scatter3. This does not allow you to change individual marker sizes or colors, but it is much easier on Matlab. Even if you need the scatter3 features, this is worth trying as a debugging step.

这篇关于如何在Matlab中使用scatter3图在同一图中绘制等值面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆