# Inserting a jpeg image at a specified point in the XY-plane

I know how to import an image into Mathematica using the Import command. The original image can come from anywhere, but call this image "myimage" after importing into Mathematica

Now my problem is how to insert this image at the point with coordinates (2,3) in the XY-plane. I know how to insert certain text at a prescribed place, but with imported images, I am not sure how to do it.

Any help will be greatly appreciated!

-
Welcome to Mathematica.SE! Please consider registering your account. It'll open up the way to using many features of this site, such as editing your question at any later time and commenting on answers for clarifications. –  Szabolcs Jul 3 '12 at 18:31

In Graphics expressions, you can use Inset in a very similar way to Text:

img = Import["http://i.stack.imgur.com/GDnKs.png"]

Graphics[Inset[img, {2, 3}], Frame -> True]


The third argument of Inset will control which point in it will be positioned at the given coordinates.

For more precise control, you can use Raster:

Graphics[
Raster[ImageData[img, DataReversed -> True], {{0, 0}, {1, 1}}],
Frame -> True]


Raster is just like Rectangle, but it renders an image inside. Don't forget to use DataReversed -> True in ImageData to get the image data in a format compatible with Raster.

-
Thnak you very much to all of you! I will try and let you know. –  tim Jul 3 '12 at 18:37

You need Inset:

im = Image@Graphics[{Circle[{0, 0}, 0.1]}];
Plot[x, {x, 0, 20}, Epilog -> Inset[im, {15, 15}]]


-