フィルターのクリア

text borders in a plot

42 ビュー (過去 30 日間)
Simon
Simon 2013 年 8 月 2 日
コメント済み: Adam Danz 2021 年 5 月 11 日
Is there anyway to plot text, and have it such that the text is, say, white, but it has a black border around itself (ie the black is the letters, not a box!)
what I tried was first printing the text in black, in size 10.4, and then overlaid white, in size 10, but it doesn't come out right.
in case anyone is still at a loss, I want something like this:
  1 件のコメント
Adam Danz
Adam Danz 2021 年 5 月 11 日
Himanshu Saxena's answer moved here as a comment
I am also looking for the solution to the raised question.

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

回答 (2 件)

Jan
Jan 2013 年 8 月 2 日
No this is not possible in Matlab.
You could write the text to an empty axes, capture the screen area, use the image processing toolbox to detect the edges, apply a method to grow the regions, capture the screen again, and post a cropped image instead of the text. Does not sound convenient.
  2 件のコメント
Simon
Simon 2013 年 8 月 2 日
nope, its not. The reason I want this is to make the text visable, without disturbing the background image. Thanks.
Jan
Jan 2013 年 8 月 2 日
What about using a tight border in the background color of the axes? Or an annotation, which is places outside the graphics with only an arrow to the concerned location?

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


Fabricio Castro
Fabricio Castro 2018 年 3 月 22 日
You can plot a bold text with a white font color, and plot the same but unbold black text over the early one. I think this is the only way to accomplish what you looking for.
  2 件のコメント
Jan
Jan 2018 年 3 月 22 日
In bold face the width of the characters is increased, such that it is unlikely, that the characters will match.
Adam Danz
Adam Danz 2021 年 5 月 11 日
That's what this answer demonstrates but as Jan said, there are restrictions. Using fixed width font helps.

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by