Skip to content

Specifying number of bins not supported #197

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 27, 2021 · 0 comments
Closed

Specifying number of bins not supported #197

xarico10 opened this issue Jul 27, 2021 · 0 comments
Assignees

Comments

@xarico10
Copy link
Contributor

When using histogram(), specifying a number of bins with the input argument nbins isn't working.

rng(1)
x = randn(100,1);
nbins = 5;
histogram(x,nbins)
fig2plotly();

The previous code should plot a histogram with 5 bins, however, it plots it with many more. This leads to differences in each bin's width and value.

Expected and generated (https://chart-studio.plotly.com/~xarico10/495/#/) plots:
Captura de Pantalla 2021-07-26 a la(s) 11 13 21 p  m
Captura de Pantalla 2021-07-26 a la(s) 11 14 22 p  m

Examples on using nbins can be found on:
https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primitive.histogram.html#buiynvy-8

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