text function in 3d plots

18 ビュー (過去 30 日間)
Leon
Leon 2014 年 6 月 26 日
コメント済み: Star Strider 2014 年 6 月 26 日
I have a plot with 4 subplots, all of which are 3d surface plots. After I plot them, I need to insert text to the plot, showing the regression equations, Rsquare, name for each subplot.
The issue is that the coordinate system seems to be very weird. Instead of horizontal and vertical, the axis has an angle.
Is there a better solution than "text"?
Thanks.
  4 件のコメント
Leon
Leon 2014 年 6 月 26 日
Thank you for the tip. That will work, although I want more flexibility :-)
Sara
Sara 2014 年 6 月 26 日
What's more flexibility?

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

回答 (1 件)

Star Strider
Star Strider 2014 年 6 月 26 日
You can vary the axis orientation with the view function. (It’s easy to come up with aesthetically pleasing orientation using the tools in the figure window itself. The azimuth and elevation coordinates display in the lower left corner of the window.)
You can also use the 'Rotation' attribute in text to change the (apparent) orientation of the displayed text.
For example:
[X,Y] = meshgrid(-10:10);
Z = (X-5).^3 + (Y+3).^3;
figure(1)
surf(X,Y,Z)
grid on
text(-5,-5,3100, '\bff(x,y) = (x-5)^2 + (y-2)^2', 'Rotation',+15)
view([-53 +26])
  2 件のコメント
Leon
Leon 2014 年 6 月 26 日
Thank you. Looks like that's the only way to go.
Star Strider
Star Strider 2014 年 6 月 26 日
My pleasure!
(The sincerest form of appreciation here on MATLAB Answers is to Accept the Answer that most closely solves your problem.)

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

カテゴリ

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