title: How can I make my Plotly subplots use the same y-axis range?
body: <p>I have a scatter plot with 3 subplots that share the x-axis. I want each subplot to use the same range for the y-axis, ie starting at 0. I've tried using <code>rangemode='tozero'</code>, but that doesn't work. Any insights would be much appreciated!</p>
  
  <p>See <a href="https://codepen.io/kbreuer/pen/XWWqwde" rel="nofollow noreferrer">https://codepen.io/kbreuer/pen/XWWqwde</a></p>
  
  <pre class="lang-js prettyprint-override"><code>var trace1 = {
    x: [0, 1, 2],
    y: [2, 3, 4],
    type: 'scatter'
  };
  
  var trace2 = {
    x: [2, 3, 4],
    y: [3, 4, 5],
    yaxis: 'y2',
    type: 'scatter'
  };
  
  var trace3 = {
    x: [3, 4, 5],
    y: [1, 2, 3],
    yaxis: 'y3',
    type: 'scatter'
  };
  
  var data = [trace1, trace2, trace3];
  
  var layout = {
    yaxis: {rangemode: 'tozero'},
    y2axis: {rangemode: 'tozero'},
    y3axis: {rangemode: 'tozero'},
    grid: {
      rows: 3,
      columns: 1,
      subplots: [['xy'], ['xy2'], ['xy3']]
     },
  };
  
  Plotly.newPlot('myDiv', data, layout);
  </code></pre>