Filter löschen
Filter löschen

How can I change the formatting on imdistline?

4 Ansichten (letzte 30 Tage)
Adam
Adam am 14 Mär. 2023
Beantwortet: Sachin am 17 Mär. 2023
I am creating a matlab app with a custom color scheme, etc. and would like to use imdistline as a part of the interface. Unfortunately, it does not appear to have properties like FontSize, FontColor, etc. as in typical figures.
Is it possible to customize imdistline? I've tried accessing properties and the 'fontsize' function to no avail.
t = text(0.5,0.5,'text here');
s = t.FontSize;
t.FontSize = 12;
obj = imdistline(...)
fontsize(obj,scale=1.2)

Antworten (1)

Sachin
Sachin am 17 Mär. 2023
Hi,
I understand that you want to change the formatting on imdistline.
You are using the ‘fontsize’ function to change the fontsize of the ‘imdistline’ obj. Since the ‘imdistline’ object is not a graphics object so you can not use ‘fontsize’ on the ‘imdistline’ object.
You can change the size of the line drawn by the ‘imdistline’ object using your mouse.
You can find more information about ‘fontsize’ here.
I suggest you check the ‘figure’ function. This might be a good help to you.
f = figure;
t = text(0.5,0.5,'test here');
h = imdistline;
fontsize(f,scale=3);

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by