Why does one of the characters appear to be subscript within the legend of my figure created from the "Anaylsis" window of the CFTOOL within the Curve Fitting Toolbox?

2 views (last 30 days)
To reproduce the behavior, perform the following steps:
1. Execute the following commands:
x_var = 1:10;
y_var = x_var.^2 + x_var + 1 + rand(size(x_var));
cftool
2. Click the "Data" button. Select the "X Data" to be "x_var", and set the "Y Data" to be "y_var". Click the "Create data set" button, and close the window.
3. Click the "Fitting" button. Click the "New Fit" button, click "Apply", then close the window.
4. Click the "Analysis" button. Select "Evaluate fit at Xi", and select "Plot data set: y_var vs. x_var". Click the "Apply" button.
You will observe that the "v"s in the legend appear to be subscript, as if the LaTeX interpreter is enabled, while the variable names appear in the title as if the LaTeX interpreter is disabled.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Feb 2021
Edited: MathWorks Support Team on 17 Feb 2021
This enhancement has been made for Release 14 SP1 (R14SP1). For previous product releases, please read below for any possible workarounds:
The ability to have the LaTeX interpreter of the legend created by the Analysis window of CFTOOL to be enabled by default is not available in the Curve Fitting Toolbox 1.1.1 (R14).
Currently, to work around this issue, you can use the Handle Graphics capabilities of MATLAB to change the "interpreter" property of the text objects to be "none".
To then set the"Interpreter" property of all text boxes on the figure to "none", use the following commands:
f = findall(0,'Name','Curve Fitting Analysis');
h = findall(f, 'type', 'text');
set(h, 'Interpreter', 'none');
For more information about the Handle Graphics capabilities of MATLAB, see the following technical note at our online support site:
"Handle Graphics and Properties Guide"

More Answers (0)

Community Treasure Hunt

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

Start Hunting!