ENLARGE AND CHANGE COLOR OF A FRACTION IN TITLE !

2 ビュー (過去 30 日間)
George Vigilaios
George Vigilaios 2020 年 8 月 19 日
コメント済み: George Vigilaios 2020 年 8 月 19 日
Hi everyone! Some help please! Beginner, here!
i used
h1=title('$y = \frac{1}{x+1}$');set (h1,'Interpreter','latex');
and got my desired fraction on title but TOO SMALL and BLACK.What are the exact lines to Change Size AND colour?
Thanks!!!

採用された回答

John D'Errico
John D'Errico 2020 年 8 月 19 日
Not THAT much of a beginner. :) A true beginner thinks Latex is something you find in rubber gloves. :)
h1=title('$y = \frac{1}{x+1}$');set (h1,'Interpreter','latex');
>> h1
h1 =
Text ($y = \frac{1}{x+1}$) with properties:
String: '$y = \frac{1}{x+1}$'
FontSize: 11
FontWeight: 'bold'
FontName: 'Helvetica'
Color: [0 0 0]
HorizontalAlignment: 'center'
Position: [0.500000638346518 1.00401459854015 0.5]
Units: 'data'
Show all properties
>> get(h1)
BackgroundColor: 'none'
BeingDeleted: off
BusyAction: 'queue'
ButtonDownFcn: ''
Children: [0×0 GraphicsPlaceholder]
Clipping: off
Color: [0 0 0]
ContextMenu: [0×0 GraphicsPlaceholder]
CreateFcn: ''
DeleteFcn: ''
EdgeColor: 'none'
Editing: off
Extent: [0.456989192742906 1.00401459854015 0.0860229307605374 0.0400822771726734]
FontAngle: 'normal'
FontName: 'Helvetica'
FontSize: 11
FontSmoothing: on
FontUnits: 'points'
FontWeight: 'bold'
HandleVisibility: 'off'
HitTest: on
HorizontalAlignment: 'center'
Interpreter: 'latex'
Interruptible: on
LineStyle: '-'
LineWidth: 0.5
Margin: 3
Parent: [1×1 Axes]
PickableParts: 'visible'
Position: [0.500000638346518 1.00401459854015 0.5]
Rotation: 0
Selected: off
SelectionHighlight: on
String: '$y = \frac{1}{x+1}$'
Tag: ''
Type: 'text'
Units: 'data'
UserData: []
VerticalAlignment: 'bottom'
Visible: on
If you want to see all the properties, get gives you an expanded list.
Now, you can change a property on the fly using a simple assignment.
>> h1.FontSize = 18;
>> h1.Color = 'r'
h1 =
Text ($y = \frac{1}{x+1}$) with properties:
String: '$y = \frac{1}{x+1}$'
FontSize: 18
FontWeight: 'bold'
FontName: 'Helvetica'
Color: [1 0 0]
HorizontalAlignment: 'center'
Position: [0.500000638346518 1.00656934306569 0.5]
Units: 'data'
Show all properties
And now the title is as I set it.
  2 件のコメント
George Vigilaios
George Vigilaios 2020 年 8 月 19 日
thank you, sir! very helpful!
George Vigilaios
George Vigilaios 2020 年 8 月 19 日
And very good humour, too! I am a beginner, indeed. You see, 20 days ago i thought Mathcad Prime 3.1 was better than Matlab. You see now, i have a good sense of humour as well.

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

その他の回答 (1 件)

KSSV
KSSV 2020 年 8 月 19 日
plot((1:10).^2)
title(['\fontsize{16}black {\color{magenta}magenta '...
'\color[rgb]{0 .5 .5}teal \color{red}red} black again'])
  1 件のコメント
George Vigilaios
George Vigilaios 2020 年 8 月 19 日
thank you very much, sir!

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

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by