Skip to content

Not possible to rotate compass() plots #245

Closed
@xarico10

Description

@xarico10

When using view() to rotate the polar chart a certain amount of degrees, nothing happens.

For example:

th = linspace(0,3*pi/2,10);
r = linspace(5,20,10);
[u,v] = pol2cart(th,r);
compass(u,v)

Plots the following:
Captura de Pantalla 2021-07-30 a la(s) 7 35 11 p  m

However, when using view(-90,90) the chart should be rotated:

th = linspace(0,3*pi/2,10);
r = linspace(5,20,10);
[u,v] = pol2cart(th,r);
compass(u,v)
view(-90,90)

fig2plotly(gcf, 'offline', false);

Expected and generated (https://chart-studio.plotly.com/~xarico10/651/#/) plots:
Captura de Pantalla 2021-07-30 a la(s) 7 36 36 p  m
Captura de Pantalla 2021-07-30 a la(s) 7 36 52 p  m

As seen, the generated plot doesn't executes such rotation and keeps plotting the arrows in the original directions (first figure).

Examples on using view() can be found on:
https://www.mathworks.com/help/matlab/ref/compass.html#mw_5ec749c2-0e3c-4829-bb54-68b0122905f2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions