从.fig文件增加分散点标记大小 [英] Increasing scatter points marker size from a .fig file

查看:144
本文介绍了从.fig文件增加分散点标记大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数字文件(scatter.fig)。这个图有很多散点图绘图仪使用scatter()。现在我只有这个fig文件,我需要增加所有分散点的标记大小。手动尝试它,但它非常困难。
有一种方法,我可以做一些像
H = figurehandle()
s = points(h)
set(s,'markersize');

I have a figure file (scatter.fig) . This figure has many scatter points plotter using scatter(). Now i just have this fig file, I need to increase the marker size of all scatter points. Tried it manually but its very difficult. Is there a way i can do something like H=figurehandle() s= points(h) set(s,'markersize');

我只是无法弄清楚确切的命令。

I just could not figure out the exact commands.

谢谢。

推荐答案

您需要获取scattergroup对象的句柄以更改标记属性。正如Jonas在一条评论中提出的,你可以很容易地通过

You need to get a handle to the scattergroup object to change the marker properties. As proposed by Jonas in a comment, you can get it easily by

   % get handle to scattergroup object
   h = gco;

由于分散组是轴的子项,您也可以通过

Since the scatter group is a child of the axis, you could also get it by

% get handle to scattergroup object
h = get(gca,'children');

如果图像包含多个图形对象(例如,额外的行),命令 findall 也许有帮助(再次Jonas的建议)。使用此命令可以搜索具有特定属性的图形对象的句柄:

If the image contains more than one graphic object (e.g., additional lines), the command findall maybe of help (again a suggestion by Jonas). With this command you can search for handles to graphic objects with specific properties:

h = findall(gca,'marker','o')

当您拥有分散组的句柄时,可以更改标记的属性

When you have a handle to the scattergroup, you can change the properties of the marker by

% change size of markers 
set(h, 'sizedata', 50)

要查看可以更改的散布组属性的完整列表,请使用

To see a full list of scattergroup properties that can be changed use

get(h)

使用

inspect(h)






如果你只想编辑一个绘图(即不需要脚本),你可以通过点击鼠标按钮来编辑实际图工具栏,然后单击图中的一个标记(Jonas再次建议)。然后右键单击标记,选择属性,然后按下按钮更多属性。在打开的UI中,将条目sizeData更改为您选择的值。


If you just want to edit a single plot (i.e. no need for scripting), you can just edit the actual figure by clicking on the mouse button on the toolbar and then clicking on one marker in the plot (again suggested by Jonas). Then you right-click on the marker, select "Properties", then you push the button "More properties". In the UI that opens up you change the entry "sizeData" to a value of your choice.

这篇关于从.fig文件增加分散点标记大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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