MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / morebins

Method morebins

source/matplot/axes_objects/histogram.cpp:823–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

821 }
822
823 size_t histogram::morebins(double bin_increase) {
824 size_t old_size = this->num_bins();
825 size_t new_size = static_cast<size_t>(
826 ceil(static_cast<double>(this->num_bins()) * (1. + bin_increase)));
827 new_size += new_size == old_size;
828 new_size = std::max(new_size, size_t(1));
829 this->num_bins(new_size);
830 return this->num_bins();
831 }
832
833 size_t histogram::fewerbins(double bin_decrease) {
834 size_t old_size = this->num_bins();

Callers 1

morebinsFunction · 0.80

Calls 2

num_binsMethod · 0.95
maxFunction · 0.50

Tested by

no test coverage detected