Skip to content

x-axis ticks not corresponding #208

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 28, 2021 · 1 comment
Closed

x-axis ticks not corresponding #208

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

Comments

@xarico10
Copy link
Contributor

When creating bars charts with bar(), the x-axis isn't being labeled as in MATLAB.

For example:

x = 1900:10:2000;
y = [75 91 105 123.5 131 150 179 203 226 249 281.5];
bar(x,y)

fig2plotly();

Expected and generated (https://chart-studio.plotly.com/~xarico10/553/#/) plots:
Captura de Pantalla 2021-07-27 a la(s) 7 47 15 p  m

Captura de Pantalla 2021-07-27 a la(s) 7 46 59 p  m

As seen, half of x-axis labels aren't there.

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

@benaliabderrahmane
Copy link
Contributor

the updated master bransh already solve this issue, I already tested with different examples and each time matlab and plotly produce the same results.

example:

code:

 x = 1900:10:2000;
y = [75 91 105 123.5 131 150 179 203 226 249 281.5];
bar(x,y)

fig2plotly();

matlab results:

issue_208_matlab

plotly results:

issue_208_plotly

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