(self, **kwargs)
| 1233 | .tag(sync=True, display_name='Number of bins') |
| 1234 | |
| 1235 | def __init__(self, **kwargs): |
| 1236 | self.observe(self.bin_data, |
| 1237 | names=['sample', 'bins', 'density', 'min', 'max']) |
| 1238 | # One unique color by default |
| 1239 | kwargs.setdefault('colors', [CATEGORY10[0]]) |
| 1240 | # No spacing between bars |
| 1241 | kwargs.setdefault('padding', 0.) |
| 1242 | |
| 1243 | super(Bins, self).__init__(**kwargs) |
| 1244 | |
| 1245 | def bin_data(self, *args): |
| 1246 | # Performs the binning of `sample` data, and draws the corresponding bars |