This message was deleted.
# help
s
This message was deleted.
πŸ‘ 1
t
πŸ˜‚ nvm what I just said, it seems like it also supports
Copy code
years = [dA, dB, dc];
 populations = [pA, pB, pC];
Plot({ marks: [Plot.barY(populations, { x: years })
this is always something I tried to get out from documentation but cannot find it anywhere
πŸ‘πŸ» 1
πŸ‘ 1
f
this is a perfectly fine data shape for Plot, just pass a {length} object as data, and your channels directly:
Copy code
Plot.barY({length: 3}, {x: [dA, dB, dc], y: [pA, pB, pC]})
t
do you know where I could find these kinds of info from the documentation
(search for β€œan array of values of the same length and order as the data”)
t
from this channel or google search or search bar in official doc?
f
to highlight the sentence in the page I linked to
t
oh thx a lot, I actually found it by myself
@Fil just an extra question regarding the matrix, it's quite general for table like data, but this is not supported by plot without custom transform right?
Copy code
[
  [d1, p1],
  [d2, p2],
  [d3, p3],
]
f
you can use {x: "0", y: "1"} to read these values, and for some marks that is just the default, see https://observablehq.com/plot/features/shorthand
πŸ‘€ 3
πŸ™Œ 1
πŸ™ 1
t
wow, really appreciate your help, it might take me forever to search them or until someone told me those exist