Skip to content

Specifying number of bins not supported #197

Closed
@xarico10

Description

@xarico10

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

Metadata

Metadata

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