フィルターのクリア

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

25 ビュー (過去 30 日間)
Dan H
Dan H 2018 年 9 月 10 日
回答済み: DGM 2023 年 3 月 22 日
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 Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by