简体   繁体   中英

Scatter polar plot in 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)

gives me an error:

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

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

Thanks,

Mike

Matlab is quite adequate for that, I think.

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)

Example:

在此输入图像描述

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

get(h)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM