Skip to content

polarplot() not supported #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xarico10 opened this issue Jul 31, 2021 · 1 comment
Closed

polarplot() not supported #240

xarico10 opened this issue Jul 31, 2021 · 1 comment
Assignees
Labels
documentation documentation

Comments

@xarico10
Copy link
Contributor

When using polarplot() to plot a line in polar coordinates, an error is being printed.

theta = 0:0.01:2*pi;
rho = sin(2*theta).*cos(2*theta);
polarplot(theta,rho)

fig2plotly(gcf, 'offline', false);

The previous code prints the following error:

Error using response_handler (line 31)
Expecting (x, y) pairs

Error in makecall (line 32)
    response_handler(resp);

Error in plotly (line 28)
response = makecall(args, origin,
structargs);

Error in plotlyfig/plotly (line 449)
                response =
                plotly(obj.data, args);

Error in fig2plotly (line 49)
p.plotly;

Error in untitled10 (line 6)
fig2plotly(gcf, 'offline', false);

Expected plot:
Captura de Pantalla 2021-07-30 a la(s) 7 06 22 p  m

Examples on using polarplot() can be found on:
https://www.mathworks.com/help/matlab/ref/polarplot.html#responsive_offcanvas

@gilbertogalvis
Copy link
Contributor

PR #343 fix this issue #240.

to test it please use following code:

theta = 0:0.01:2*pi;
rho = sin(2*theta).*cos(2*theta);
polarplot(theta,rho)

fig2plotly(gcf, 'offline', 0, 'TreatAs', 'polarplot');

NOTE: it is necessary to use TreatAs Plot Option as 'polarplot'

results looks as follow

Screen Shot 2021-08-14 at 3 26 36 PM

Screen Shot 2021-08-14 at 3 27 09 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation
Projects
None yet
Development

No branches or pull requests

3 participants