# How to change size of an image in the background of a graph?

I'm trying to put a background image in a graph I've made but I can't figure out how to resize it so it fits the whole background, rather than just the section. The code I have so far is

combinedPlot = Show[linDataPlot, linFitPlot, errorplot, linDataPlot2,
PlotRange -> {{0.8, 2.2}, {40, 280}}, AspectRatio -> 1, Prolog -> Inset[dog]]


which shows

Ideally the image would reach to the frame of the graph. I think I just need to change something in the "Prolog" area of the code in order to get it to scale? And also change the "PlotRange" so it's the same ratio as the image.

However, I tried to do this with the "Raster" command:

combinedPlot = Show[linDataPlot, linFitPlot, errorplot, linDataPlot2,
PlotRange -> {{0.8, 2.2}, {40, 280}}, AspectRatio -> 1,
Prolog -> Raster[Show[dog][[1, 1]], {Scaled[{0, 0}], Scaled[{1, 1}]}]]


But for some reason the image goes really weird and looks like this:

• I don't know what dog is in your example, but look up what data Raster needs (a 2D array of numbers or of RGB triplets). – Szabolcs Aug 9 '18 at 8:01

Plot[Sin[x], {x, 0, 10},