Replies: 1 comment 5 replies
-
This is what Plot.auto is for.
(It would be nice if auto would know how to treat an array of numbers, allowing us to say ``Plot.auto(numbers).plot()`, but it's not yet the case.) For a slightly different example with an accessor: |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When working with one-dimensional data, I wish there was a very simple and easy to memorize way to generate a histogram.
Something likes R's / matplotlib's
hist(data)
.I know there's a Plot shorthand
Plot.rectY(data, Plot.binX()).plot()
, but it requires much more typing and is less ergenomic. Could something likePlot.hist(data).plot()
be an alternative?In an Observable notebook, what I usually end up doing is that I search and insert the "Histogram chart" snippet instead. The snippet requires an array of objects though, so the one-dimensional data needs to be transformed first. It would be nice to have a simpler solution for these scenarios!
Beta Was this translation helpful? Give feedback.
All reactions