Control figure properties in maineffectsplot

2 views (last 30 days)
I am struggling with changing the appearance of the plot generated by the maineffectsplot function.
I would like to control the line object properties of LineWidth , LineStyle , color and others for the plot created by maineffectsplot.
y=rand(5,1);
x=randi(5,5,4);
[figh,AXESH]=maineffectsplot(y,x,'varnames',{'Rand 1','Rand 2','Rand 3','Rand 4'});
and then to change the lines of the plot to be thicker and not blue...
set(?,'LineWidth',1.5,'Color',[ 0 0 0]);
Any ideas on how to achieve this?
  3 Comments
David
David on 10 Feb 2017
I cannot accept comments as answers?
Adam
Adam on 10 Feb 2017
I can add it as an answer if it solves the problem well enough.

Sign in to comment.

Accepted Answer

Adam
Adam on 10 Feb 2017
Looks like it is one of those ugly functions that takes it upon itself to create axes and figures, but doesn't return the handles of the line objects. So you would have to fish them all out from the subplots via the 'Children' property of each axes I would imagine.
  1 Comment
David
David on 10 Feb 2017
Thank you Adam!
From your suggestion I tried:
subplots = get(AXESH(1),'Children')
set(subplots,'LineWidth',4)
And that worked.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!