Set text box transparency

15 ビュー (過去 30 日間)
Lucia
Lucia 2015 年 11 月 4 日
編集済み: Jan 2015 年 11 月 5 日
Hello, I have created a big GUI with two panels. In one of the two panels I plot N different subplots imagesc).On the right side of each subplot, the relative colorbar is dispayed. Then I added a push button which, whenever pushed, allows to get points coordinates and diplayes them in a text box (function text) at each click of the mouse. The problem is that, when I click on a point which is close to the right edge of the subplot, the text box goes behind the colorbar and the coordinates could not be red, of course. Any solution to this problem? I tried with uistack or by drawing a patch under the textbox, but this does not work.
  4 件のコメント
Adam
Adam 2015 年 11 月 5 日
Can you not just use a staticly positioned text box?
TastyPastry
TastyPastry 2015 年 11 月 5 日
can you put a screenshot of what you're trying to do up?

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2015 年 11 月 5 日
編集済み: Jan 2015 年 11 月 5 日
You can check the position of the text compared to the axes limits. If it is near to the right side, use:
text(x, y, 'String', 'HorizontalAlignment', 'right');

カテゴリ

Help Center および File ExchangePolygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by