在Matlab中散布极坐标图 [英] Scatter polar plot in matlab

查看:214
本文介绍了在Matlab中散布极坐标图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试进行楔形图绘制(右提升与红移).我以为我可以在极坐标中使用散点图. Matlab中的极函数似乎非常有限.即使这样

I'm trying to do a wedge plot (right ascension vs redshift). I was thinking I could use a scatter plot in polar coordinates. The polar function in matlab seems very limited. Even this

polar(a(:,1),a(:,2),'Linewidth',1)

给我一​​个错误:

Error using polar (line 23)
Too many input arguments.

有没有一种简单的方法可以使用Matlab实现我想要的?您是否知道其他可以轻松实现的软件?

Is there a simple way to achieve what I want using Matlab? Do you know of another software that would do it easily?

谢谢

迈克

推荐答案

Matlab足以满足要求.

Matlab is quite adequate for that, I think.

对于polar函数,似乎不允许直接指定属性(例如'linewidth').但是您可以获取所创建对象的句柄,然后设置其'linewidth'或其他属性:

As for the polar function, it seems it doesn't allow properties (such as 'linewidth') to be specified directly. But you can get a handle to the created object and then set its 'linewidth', or other properties:

h = polar(a(:,1),a(:,2));
set(h,'linewidth',1)

如果要散点图,也许您不希望有线条,而是在每个点上绘制标记(例如点):

If you want a scatter plot, maybe you'd prefer not to have lines, but instead to plot a marker (such as a dot) at each point:

h = polar(a(:,1),a(:,2),'.');
set(h,'markersize',12)

示例:

要查看可以设置的属性及其当前值的列表,请输入

To see a list of properties that you can set, as well as their current values, type

get(h)

这篇关于在Matlab中散布极坐标图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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