You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function allows you to create a histogram when your data is already aggregated (aka you don't have access to raw values, but you have access to bins and counts for each bin).
278
+
279
+
This comes handy when working with APIs such as [OpenTelemetry Metrics API](https://opentelemetry-python.readthedocs.io/en/latest/api/metrics.html)
280
+
where views such as [ExplicitBucketHistogramAggregation](https://opentelemetry-python.readthedocs.io/en/latest/sdk/metrics.view.html#opentelemetry.sdk.metrics.view.ExplicitBucketHistogramAggregation)
281
+
only expose access to aggregated values (counts for each bin/ bucket).
282
+
283
+
```python
284
+
In [8]: plotille.hist_aggregated?
285
+
Signature:
286
+
plotille.hist_aggregated(
287
+
counts,
288
+
bins,
289
+
width=80,
290
+
log_scale=False,
291
+
linesep='\n',
292
+
lc=None,
293
+
bg=None,
294
+
color_mode='names',
295
+
)
296
+
Docstring:
297
+
Create histogram for aggregated data.
298
+
299
+
Parameters:
300
+
counts: List[int] Counts for each bucket.
301
+
bins: List[float] Limits for the bins for the provided counts: limits for
302
+
bin`i` are `[bins[i], bins[i+1])`.
303
+
Hence, `len(bins) ==len(counts) +1`.
304
+
width: int The number of characters for the width (columns).
305
+
log_scale: bool Scale the histogram with`log` function.
306
+
linesep: str The requested line seperator. default: os.linesep
307
+
lc: multiple Give the line color.
308
+
bg: multiple Give the background color.
309
+
color_mode: str Specify color input mode; 'names' (default), 'byte'or'rgb'
0 commit comments