# Plotly js subplot secondary y axis

**URL:** <https://community.plotly.com/t/plotly-js-subplot-secondary-y-axis/28160>\
**Category:** plotly.js\
**Created:** [September 3, 2019, 1:24pm UTC](https://community.plotly.com/t/plotly-js-subplot-secondary-y-axis/28160 "2019-09-03T13:24:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shjens](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@shjens](https://community.plotly.com/u/shjens)\
**Post date:** [September 3, 2019, 1:24pm UTC](https://community.plotly.com/t/plotly-js-subplot-secondary-y-axis/28160/1 "2019-09-03T13:24:21Z")

</div>

I have 15 subplots with 4 datasets on each of them (2 box and 2 scatter x 15).  
Trying to have the scatter plots on a secondary y axis (and set their ranges), but can’t seem to figure it out in plotly js.  
Managed to get it running on python with the use of fig.update\_yaxes(range=##,secondary\_y=True,row=row,col=col)  
Does anyone know how to fun this in javascript ? aiming for output as figure below:  
Many thanks

 ![15plots](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/5/58bec75e11c0e8969abf9846d5b7cf28cc1fd734.jpeg)

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [September 12, 2019, 2:22pm UTC](https://community.plotly.com/t/plotly-js-subplot-secondary-y-axis/28160/2 "2019-09-12T14:22:39Z")

</div>

The codepen in [Subplots w/multiple y-axes](https://community.plotly.com/t/subplots-w-multiple-y-axes/28352/2) presents one way of doing this that might work for your use case.
