Why does generated code from cftool produce a different looking graph than cftool?

Why does generated code from cftool produce a different looking graph than cftool?
When I make a figure using the cftool and then generate code and make a figure using the same data, the figure looks slightly different in terms of coloring and view.
I like the cftool figure better, how can I get this behavior?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2018 年 4 月 18 日
After generating code from cftool, here are a couple properties you can change to get the plots to be more similar:
>> f = gcf;
>> a = gca;
>> L = a.Children(1);
>> S = a.Children(2);
>> L.MarkerFaceColor = 'k';
>> L.MarkerEdgeColor = [0 0 0];
>> L.MarkerSize = 3;
>> S.EdgeColor = [0 0 0];
>> S.EdgeAlpha = .3;
>> f.Position = [f.Position(1:2) 1008 520];
>> a.View = [-37.5 30];
Note: Running the code above does not give an exact replica of the cftool figure. To find the exact same figure, follow the following steps:
- Create the desired figure in cftool
- File -> Print to figure
- Then compare the properties of this figure and the generated code figure to find all the differences

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

製品

リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by