# Dual y-axes in Plot ?

**URL:** <https://talk.observablehq.com/t/dual-y-axes-in-plot/6152>\
**Category:** Help\
**Created:** [January 31, 2022, 12:18pm UTC](https://talk.observablehq.com/t/dual-y-axes-in-plot/6152 "2022-01-31T12:18:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wof4ftf](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/wof4ftf/32/5256_2.png) [@wof4ftf](https://talk.observablehq.com/u/wof4ftf)\
**Post date:** [January 31, 2022, 12:18pm UTC](https://talk.observablehq.com/t/dual-y-axes-in-plot/6152/1 "2022-01-31T12:18:52Z")

</div>

How do you make dual y-axes in Plot ?

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [January 31, 2022, 2:04pm UTC](https://talk.observablehq.com/t/dual-y-axes-in-plot/6152/2 "2022-01-31T14:04:52Z")

</div>

It’s not supported out of the box, but here are a few links showing possibilities:

- [Dual-axis bar-line chart (#147) / Fil / Observable](https://observablehq.com/@fil/dual-axis-bar-line-chart)
- [Plot facets with varying scales? - #2 by Fil](https://talk.observablehq.com/t/plot-facets-with-varying-scales/5557/2)

---

<div class="post-metadata">

**Author:** ![jwoLondon](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jwolondon/32/259_2.png) [@jwoLondon](https://talk.observablehq.com/u/jwoLondon)\
**Post date:** [January 31, 2022, 3:12pm UTC](https://talk.observablehq.com/t/dual-y-axes-in-plot/6152/3 "2022-01-31T15:12:23Z")

</div>

I find a useful design rule-of-thumb to be whenever contemplating a dual-axis chart, ask yourself whether two juxtaposed charts, or a connected scatterplot might be more effective. I’m not experienced with Plot, but it would appear both are possible.

Worth re-emphasising Lisa Charlotte Muth’s article on alternatives to dual-axis plots (also linked to in the Fil’s second post above):

> **[Why not to use two axes, and what to use instead](https://blog.datawrapper.de/dualaxis/)**
>
> We believe that charts with two different y-axes make it hard for most people to intuitively make right statements about two data series.

---

<div class="post-metadata">

**Author:** ![tophtucker](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/tophtucker/32/4781_2.png) [@tophtucker](https://talk.observablehq.com/u/tophtucker)\
**Post date:** [May 9, 2023, 4:34am UTC](https://talk.observablehq.com/t/dual-y-axes-in-plot/6152/4 "2023-05-09T04:34:17Z")

</div>

Now easier with the [axis mark](https://observablehq.com/plot/marks/axis) (though it still requires some manual transformation):

> **[Plot: Dual axis line chart](https://observablehq.com/@tophtucker/plot-dual-axis-line-chart)**
>
> Use with care. See also.

---

<div class="post-metadata">

**Author:** ![oscar6echo](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/oscar6echo/32/647_2.png) [@oscar6echo](https://talk.observablehq.com/u/oscar6echo)\
**Post date:** [January 30, 2024, 5:09pm UTC](https://talk.observablehq.com/t/dual-y-axes-in-plot/6152/5 "2024-01-30T17:09:55Z")

</div>

It is worth mentionning this recent official (mbostock) notebook:

> **[Plot: Dual axis chart](https://observablehq.com/@observablehq/plot-dual-axis)**
>
> To implement a dual-axis chart, we remap efficiency to its equivalent value in sales using a linear scale. Ref. #147.
