how to place an annotation one level deeper?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Harald von der Osten
am 11 Jan. 2021
Kommentiert: Harald von der Osten
am 11 Jan. 2021
Hi,
I would like to place a small image into an annotation. It works if I don't choose a background color:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/484753/image.png)
But I would like to set the background color to black (this makes the picture (i.e. the grayscale) invisible. So, how can I shift the annoation one level back or to shift the small image one layer up? Using FaceAlpha is not an option for me...
Thanks a lot
2 Kommentare
Cris LaPierre
am 11 Jan. 2021
Could you share your images and your current plotting code for us to test with?
Akzeptierte Antwort
Cris LaPierre
am 11 Jan. 2021
I'm not aware of a way to order the layers. I think my approach would probably be to add a black shape in the image under the annotation. The annotation will move if the figure is resized.
% Add black shape in specified location
bx = mapshape([3541660 3541900 3541900 3541660],[5492180 5492180 5492250 5492250],'Geometry','polygon');
mapshow(ax,bx,'FaceColor','k')
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!