Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to draw polar plot with points instead of lines

Subject: How to draw polar plot with points instead of lines

From: Camille Couzi

Date: 30 Aug, 2010 20:25:22

Message: 1 of 3

Hi,
I am wondering if it is possible to draw points instead of lines in the polar plot, ie if we have a direction vector and a rho vector like those:
dir=[320 50 65 72];
rho=[0.2 1.3 0.5 0.95]
then we would get a polar (dir,rho) with four points and no lines between them.
Somebody could give me a tip?
Thanks!
Camille.

Subject: How to draw polar plot with points instead of lines

From: Walter Roberson

Date: 30 Aug, 2010 21:03:36

Message: 2 of 3

On 10-08-30 03:25 PM, Camille Couzi wrote:

> I am wondering if it is possible to draw points instead of lines in the
> polar plot, ie if we have a direction vector and a rho vector like those:
> dir=[320 50 65 72];
> rho=[0.2 1.3 0.5 0.95]
> then we would get a polar (dir,rho) with four points and no lines
> between them.
> Somebody could give me a tip?

It is not a good idea to use "dir" as a variable name, as it is the name of a
Matlab function; Matlab can do unexpected things when it encounters such cases.

Anyhow, try adding the linestyle to your polar call:

polar(dir, rho, '.')

Subject: How to draw polar plot with points instead of lines

From: Greg

Date: 28 Jul, 2011 19:09:26

Message: 3 of 3

Walter Roberson <roberson@hushmail.com> wrote in message <i5h6do$93n$1@canopus.cc.umanitoba.ca>...
> On 10-08-30 03:25 PM, Camille Couzi wrote:
>
> > I am wondering if it is possible to draw points instead of lines in the
> > polar plot, ie if we have a direction vector and a rho vector like those:
> > dir=[320 50 65 72];
> > rho=[0.2 1.3 0.5 0.95]
> > then we would get a polar (dir,rho) with four points and no lines
> > between them.
> > Somebody could give me a tip?
>
> It is not a good idea to use "dir" as a variable name, as it is the name of a
> Matlab function; Matlab can do unexpected things when it encounters such cases.
>
> Anyhow, try adding the linestyle to your polar call:
>
> polar(dir, rho, '.')

I am trying to use polar plot, but if I change the linestyle to anything that doesn't connect the points (points, squares, etc.) the points are plotted behind the white of the axes so I can see them unless I zoom in so they move out from behind into the gray between the edge of the axes and the figure.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us