| [ Web Proxy ] |
| Viewing: https://plot.ly/javascript/log-plot/ | [Back] [Original] |
[Sign up for the upcoming webinar: Introducing Plotly Studio Embedded]
How to make a plot with D3.js-based logarithmic axes in javascript.
Plotly Studio: Transform any dataset into an interactive data application in minutes with AI. Try Plotly Studio now.
var trace1 = {
x: [0, 1, 2, 3, 4, 5, 6, 7, 8],
y: [8, 7, 6, 5, 4, 3, 2, 1, 0],
type: 'scatter'
};
var trace2 = {
x: [0, 1, 2, 3, 4, 5, 6, 7, 8],
y: [0, 1, 2, 3, 4, 5, 6, 7, 8],
type: 'scatter'
};
var data = [trace1, trace2];
var layout = {
xaxis: {
type: 'log',
autorange: true
},
yaxis: {
type: 'log',
autorange: true
}
};
Plotly.newPlot('myDiv', data, layout);
[plotly-studio.png]
| Web Proxy Viewer | New URL | Original Page |