<head>
 <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
  <div id="graph"></div>
</body>
var x = [10,50,90,120,160];
var y1 = [10,70,65,95,105];
var y2 = [12,52,55,80,100];

var trace1 = {
  x:x,
  y:y1,
  type:'scatter',
  xaxis:'x',
  yaxis:'y'
}
var trace2 = {
  x:x,
  y:y2,
  type:'scatter',
  xaxis:'x',
  yaxis:'y2'
}
var data =[trace1,trace2];
var layout  = {
    title: 'Coeficientes',
    showlegend: true,
    legend: {
        "orientation": "h"
    },
    width: 800,
    height: 580,
    autosize: true,
    margin: {
        left: 50, rright: 70, bottom: 50, top: 50, paddding: 2
    },
    xaxis: {title: 'Ângulo [graus]'},
    yaxis: {title: '[kN/(m/s)²]'},
    yaxis2 : {
        title: '[kN.m/(m/s)²]',
        overlaying: 'y',
        side: 'right',
        showgrid:false,
    }
}
Plotly.plot('graph', data,layout);
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.