Re: Using a jpg picture for a 2D plot background
- To: mathgroup at smc.vnet.net
- Subject: [mg99027] Re: Using a jpg picture for a 2D plot background
- From: Helen Read <hpr at together.net>
- Date: Fri, 24 Apr 2009 03:48:04 -0400 (EDT)
- References: <gspgk7$nro$1@smc.vnet.net>
- Reply-to: HPR <read at math.uvm.edu>
Bill wrote: > Hi: > > I would like to use a jpg picture as a background for a 2D plot in Mathematica 6.0.1, on a PC using Win XP. > I'm not sure if this can be done. If this can be done, can someone please give me the code to do this? SetDirectory[NotebookDirectory[]] (* set the working directory to the directory where the notebook lives *) pic=Import["picture.jpg"] (* import your picture *) plot = Plot[x + 2 Sin[x], {x, -5 \[Pi], 5 \[Pi]}, PlotStyle -> {Thick, Red}] ImageCompose[pic, plot] -- Helen Read University of Vermont