This works with the default bin method (square root) and works with sturges, but does not work with freedmanDiaconis or scott. For the two methods where it does not work, I receive an "Invalid array length" error.
While the chart itself isn't meaningful when it only has 1 value, it is a use case that will come up occasionally.
Occasionally, I need to show a histogram that contains only one value (the dataset below is an example):
This works with the default bin method (square root) and works with
sturges
, but does not work withfreedmanDiaconis
orscott
. For the two methods where it does not work, I receive an "Invalid array length" error.While the chart itself isn't meaningful when it only has 1 value, it is a use case that will come up occasionally.