# Plot image function together maintaining compatibility between their coordinate systems?

Is it possible to plot an image, i.e., draw it's pixels against usual coordinates? My goal is to plot my image and my function in the same coordinates.

Update

I drew an image of size 200x100 and drew a spot at 100,50. When plotting it should coincide with actual coordinates, but it doesn't.

i.e. image takes random size and random scale both unrelated with plot size and scale. While I need each pixel be located at it's correct coordinates, not only image corner.

Update 2

Why Image is not a Graphics primitive or directive?

• Can you supply the code for your function, its plot, and your image? You haven't given us much to work with. – m_goldberg Jun 25 '13 at 13:46
• The image pixels are square so you will need to use AspectRatio -> Automatic in your plot. – Simon Woods Jun 25 '13 at 15:18
• If you would rather have the image distort to match the aspect ratio of the plot, you could use Prolog -> Raster@Reverse@ImageData@im – Simon Woods Jun 25 '13 at 15:19
• @SimonWoods your last suggestion was what I looked for – Suzan Cioc Jun 25 '13 at 15:29
• You have to set up AspectRatio if you specify the PlotRange: AspectRatio -> 1/Divide @@ ImageDimensions[im]. – shrx Jun 25 '13 at 19:01

Plot[Sin[x], {x, 0, 10},

First you plot your function and then, using Inset, you insert your image into the plot. The fourth parameter given to Inset is the size given in the coordinate system of the plot.
Prolog draws the image before the plot is drawn. Epilog would do the same but draw the image after the plot is drawn, on top of it.