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)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Edited: MathWorks Support Team
on 17 Feb 2021
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
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"
0 Comments
More Answers (0)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!