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?

 Réponse acceptée

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

Plus de réponses (0)

Catégories

Produits

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by