Plot.plot({
width: 960,
x: {round: true, nice: d3.utcWeek},
y: {inset: 6},
marks: [
Plot.frame({fill: "#eaeaea"}),
Plot.frame({anchor: "bottom"}),
Plot.axisX({ticks: "year", tickSize: 28, tickPadding: -11, tickFormat: " %Y", textAnchor: "start"}),
Plot.axisX({ticks: "month", tickSize: 16, tickPadding: -11, tickFormat: " %b", textAnchor: "start"}),
Plot.gridX({ticks: "week", stroke: "#fff", strokeOpacity: 1, insetBottom: -0.5}),
Plot.line(aapl.slice(-340, -10), {x: "Date", y: "Close", curve: "step"})
]
})