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 Aug 19 '16 at 20:19

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, privacy policy and cookie policy

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