Is it possible to use an image as a plot background?

  • $\begingroup$ I would say something like Plot[Sin[x], {x, 0, 10}, Prolog -> {Rasterize[RandomImage[], "Graphics"]}] but that seems to error out... Anyone have any idea if it actually is invalid? $\endgroup$
    – ktm
    Commented Aug 19, 2016 at 20:19

1 Answer 1


One can use Prolog to create a background for a Plot.

Plot[Sin[x], {x, 0, 2 Pi}, PlotStyle -> Red, 
 Prolog -> Inset[RandomImage[UniformDistribution[{.2, .6}], ColorSpace -> "Grayscale", 
    ImageSize -> Full]], PlotRangeClipping -> False, 
 AxesStyle -> White]



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.