matlab - 正确缩放散点图中的圆形标记

标签 matlab plot scatter

我有一个有限大小的圆形粒子系统(比如 r=5cm),我需要在给定域(比如 L=5m)中绘制它。由于它们很多,scatterrectangle 的任何循环使用都快。

我不清楚的是定义圆/标记直径/半径的正确方法,以便与绘制的域几何正确缩放. (通过使用rectangle,可以轻松定义粒子的直径。)

基于 this answer , 可以很好地控制标记的大小,尽管真正的缩放比例对我来说是模糊的。

任何人都可以解释一下吗?

最佳答案

The SCATTER function expects its 'S' parameter to contain the marker area in points squared. This area corresponds to the area of a square bounding box around the marker.

来源为技术方案“How do I specify the size of the markers created by the SCATTER plot in units proportional to the data being plotted in MATLAB 7.6 (R2008a)?

查看链接中的代码。

关于matlab - 正确缩放散点图中的圆形标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16771972/

相关文章:

charts - 谷歌散点图,不同点大小

matlab - 重载! (爆炸)运算符(operator)

r - 围绕给定百分比的点绘制圆/凸包

python - 多指标散点图

Python:如何并排绘制多个 seaborn 热图?

python - 根据柱高绘制 x 轴值的直方图

python - 有没有办法根据不同列中的离散变量制作 matplotlib 散点图标记或颜色?

Matlab - 稀疏矩阵系统分辨率

matlab - 如何以编程方式更新直方图内容和数据提示位置? (MATLAB hg2)

matlab - 根在函数中不起作用