Skip to content
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

Rendering issues when using pie() #194

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

Rendering issues when using pie() #194

xarico10 opened this issue Jul 26, 2021 · 1 comment
Assignees

Comments

@xarico10
Copy link
Contributor

When using pie, the default colors doesn't match with those from MATLAB and the grid is automatically printed, when in MATLAB isn't (and doesn't really make sense to have a grid on a pie chart). Also, seems to be a deformation on the shape (not plotting a well-formed circle).

For example,

X = [1 3 0.5 2.5 2];
pie(X)

fig2plotly();

Expected and generated (https://chart-studio.plotly.com/~xarico10/467/#/) plots:
Captura de Pantalla 2021-07-26 a la(s) 4 29 28 p  m
Captura de Pantalla 2021-07-26 a la(s) 4 29 41 p  m

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

@gilbertogalvis
Copy link
Contributor

PR #349 fix this issue

For this I proposed a new plot option to control axis size called AxisEqual

code to test:

close all, clc
X = [1 3 0.5 2.5 2];
pie(X)
fig2plotly(gcf, 'offline', 0, 'AxisEqual', true);

Using before code results are as bellow

Screen Shot 2021-08-18 at 8 37 52 PM

Screen Shot 2021-08-18 at 8 38 58 PM

If 'AxisEqual' is not set or is set to false then the result is as bellow

Screen Shot 2021-08-18 at 8 43 13 PM

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

No branches or pull requests

2 participants