🏠 back to Observable

Plot, sharing same x-axis for different charts

Hello again. I’m trying to wrap my head around Plot, so excuse me if this question is naive. I have the following 2 charts:

Is there a way to use a unique temporal x-axis for the bars and the line?

Sure, if you use the same “hard-coded” parameters, for example:

x: {domain: d3.extent(test, d => d[1]), range: [65, 620]},

in the (near) future we plan to expose scales from a plot so you can reuse them in another plot; see expose scales by Fil · Pull Request #538 · observablehq/plot · GitHub

3 Likes

Ok, neat! Thanx also for the pointer to the upcoming features