How can I change the formatting on imdistline?

3 views (last 30 days)
Adam
Adam on 14 Mar 2023
Answered: Sachin on 17 Mar 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)

Answers (1)

Sachin
Sachin on 17 Mar 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);

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!