Can not shift image relative to plot with Imtranslate
Show older comments
I try to overlay a plot and an loaded image to show resemblance. As the axis of my plot are position data from an experiment they are not centered around [0,0]. Therefore the image and the plot do not overlap. I tried to shift the image with imtranslate to overlay it with the plot, however the image is not translated but instead of the image there is a black box starting at [1 ,1]
gscatterplot, centered around [-30 , -84]

gscatterplot, centered around [-30 , -84] and image loaded by image=imread('overlay_test.png') and shown with imshow(image), also the plot axis was flipped by including the image.

gscatterplot, centered around [-30 , -84] and image shifted by [-30, -84] with imtranslate(image,[xcenter ycenter])

It seems I cant translate the image relative to the plot, just relative to an image axis. How can make the image translate relative to the plot axis? I would prefer not to shift the data to 0,0 as this is one of multiple subplots showing the same image section.
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!