[Date Index]
[Thread Index]
[Author Index]
Re: Placing images in the coordinate system?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg103764] Re: [mg103712] Placing images in the coordinate system?
*From*: "King, Peter R" <peter.king at imperial.ac.uk>
*Date*: Mon, 5 Oct 2009 07:39:01 -0400 (EDT)
*References*: <200910031303.JAA06120@smc.vnet.net>
I had a similar questin for v 6 where I want to be able to rescale the image & graphic interactively.
I have a bitmap image (.bmp file) - call it pict - that I wish to use as the background for some graphics. I do this with
Graphics[Table[Point[{x, 50 Sin[2 \[Pi] x/100]}], {x, 0, 100}], Prolog -> Inset[pict]]
(the actual graphics is more complicated than a sine curve but never mind).
Now if I just display the graphics by typing pict I can rescale this by clicking on the image and dragging the corners of the orange box. However when I overlay the graphics onto the image (as above) and try to drag the box it rescales the plot but not the background image. Is there any way I can link the two together so I can rescale by dragging the cursor? I tried GraphcsGrouping but that didn't get me anywhere.
> -----Original Message-----
> From: mathgroup-adm at smc.vnet.net
> [mailto:mathgroup-adm at smc.vnet.net] On Behalf Of Dave
> Sent: 03 October 2009 14:03
> To: mathgroup at smc.vnet.net
> Subject: [mg103712] Placing images in the coordinate system?
>
> Hello,
>
> Using Mathematica 7.0, how can I take an image and give it a position
> and scale, so that it can be combined with other graphics?
>
> Here's what I am trying to do: I would like to have an image map of
> the moon as the background for my plot or contour plot. I want to be
> able to plot points by their lat,lon positions and have them appear at
> the correct points on the map.
>
> I came up with a hack to do this by rasterizing the plot using Image[]
> so that it is the same resolution as the moon image, and then
> combining the two images.
> (I found a similar technique here:
> http://mathgis.blogspot.com/2007/12/fun-with-image-overlay.html)
>
> The problem is this does not work if the plot has Axes->True, because
> some space is used for the axes, so the coordinate systems don't match
> exactly anymore.
>
> I really would like to have both Axes and the image together. Is there
> a good way to do this?
>
>
> Thanks,
> Dave
>
>
Prev by Date:
**Re: confused about == vs === in this equality**
Next by Date:
**Re: on passing arguments to a function, how to break a**
Previous by thread:
**Placing images in the coordinate system?**
Next by thread:
**Re: Placing images in the coordinate system?**
| |