I have two plots.
- plot1 is a colour graph generated using ArrayPlot.
- plot2 is a function plotted using Plot.
I want to do two things.
- Scale the axes of plot1 to be the same as plot2 (instead of just pixel counts).
- Overlay plot2 onto plot1.
As an example, say I have
plot1 = ArrayPlot[RandomReal[{0, 1}, {100, 100}], FrameTicks -> Automatic]
plot2 = Plot[x^2, {x, 0, Pi}, PlotRange -> {0, 2 Pi}, PlotStyle -> {Thick,Red}]
How do I scale plot1 to read x-values from 0 to $\pi$ and y-values from 0 to $2\pi$ and then overlay plot2 on top of plot1?
I'm open to suggestions on using different plotting functions if there's a more logical way of doing this.