Re: overlay imported picture with Mathatmatica calc
- To: mathgroup at smc.vnet.net
- Subject: [mg29590] Re: overlay imported picture with Mathatmatica calc
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 27 Jun 2001 05:12:25 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <9h8mee$qtj$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, If you import an image, it had the xy-box of the pixel dimensions but you need the plane area of your contour plot. The simplest way to do it is yourBitmap = Import["/export/home/kuska/mathpng2/Pictures/tigerg.png"]; ContourPlot[Sin[x*y], {x, 0, Pi}, {y, 0, Pi}, ContourShading -> False, Prolog -> {yourBitmap[[1]] /. Raster[bm_, rr_, more___] :> Raster[bm, {{0, 0}, {Pi, Pi}}, (* Place here the new bound used in the contour plot *) more]}] be sure to set the shading to false (otherwise the polygons overlay the bitmap). Set the bounds of the Raster[] object to your area in the xy-plane used in the contour plot. Regards Jens Alvin Larson wrote: > > Hello: > > I have a scanned picture, which I can import into Mathematica as a *.jpg or a > *.tif file. I can view the jpg and tif files in a notebook. I would like to > overlay this picture with a contour plot (colored lines with no shading) to > produce a combined picture for comparing experiment with calculation.. Using > Show[{,}] doesn't work (little contour and VERY big jpg). Can anyone give me > advice on how to produce such and overlay of a calculation on a scanned > picture. If I were to save the contour plot as a postscript file, is there a > program that would combine it with the scanned picture converted to a postscript > file? > > Thank you .... Al Larson