I’m trying to plot a histogram of experimental data and the analytical function as a line chart (note that the histogram is not simply the line function binned) on the same plot, but the histogram bars are really narrow. How can I fix this? The plot looks like this:
My code is something like this:
Plot.plot({
marks: [
Plot.barY(bardata, {x: "energy", y: "flux"}),
Plot.lineY(linedata, {x: "energy", y: "flux", stroke: "red"}),
Plot.axisX({anchor: "bottom", tickSpacing: 10})
]
})
Also, how can I make the labels on the x-axis not overlap and have a million labels?
Thank you!!