How to show picture at specified relative position in a plot?

25 次查看(过去 30 天)
Hello, by using the the "axes" and "imshow" command, it is possible to place a picture at a specified position in an existing figure / plot using. For example, see question + answer
However, the coordinates used by the "axes" command refer to the entire figure window. In my case, I want the picture displayed at positions which refer to the x / y axes of the main plot, i.e. (0, 0) shall not be the lower left corner of the figure, but the origin of xy coordinates of the plot.
Background: I am trying to built a work-around for a previous inquiry lnk Multiple (rotated) histograms in one xy plot. I have created multiple pictures (= identically scaled and rotated histograms), now I want show them "stacked": Their baseline should be at specified x coordinates of the xy-plot (e.g. x=1, x=2, x=3)
Thanks in advance for any input, Dan
  1 个评论
jonas
jonas 2018-9-10
编辑:jonas 2018-9-10
It's possible. You just need to convert the axes1 position to figure position. Fairly easy to do this from scratch, but I recall seeing a FEX function for this... I'll see if I can find it
EDIT: this is the one I was thinking about

请先登录,再进行评论。

回答(1 个)

DGM
DGM 2023-3-22
To insert an image does not require an overlaid axes. You can do it as in this example:
That said, using an overlaid axes might be desirable if you wanted the inserted histograms to actually be histogram objects instead of static screenshots.

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by