Boxplot X-axis change label size

Dear all,
I've been googling and trying all sorts of things to get my label a proper size from a boxplot. The 'names' on the x-axis are obtained from the excel that is loaded ( boxplot(num(:,1),txt(:,1)) ). However i can't get the text to increase in size.. not even with figure editor..
Can anybody please help me
Added is the figure i am talking about

9 Commenti

You have tried the following?

set(gca,'fontsize',15)
Twevers
Twevers il 27 Mar 2018
Yes, i already tried all that sort of things unfortunately... I think it is because, as mentioned, the text is obtained from the excel. But i think there must be a way to increase the size of this.
jonas
jonas il 27 Mar 2018
That's weird. The source of the data should not matter. I could give it a try if you upload the data (or part of it) and code.
Twevers
Twevers il 28 Mar 2018
sure:
Code (not that special):
[num,txt,raw] = xlsread('boxplot.xlsx', 'Sheet1');
boxplot(num(:,1),txt(:,1))

The following code gives me the figure below.

[num,txt,raw] = xlsread('boxplot.xls', 'Sheet1');
boxplot(num(:,1),txt(:,1))
set(gca,'fontsize',15)
xtickangle(45)

Are you creating another set of axis when you are plotting the mean values?

Twevers
Twevers il 28 Mar 2018
Modificato: Walter Roberson il 28 Mar 2018

Hello Jonas,

Yes, i am also plotting the title, y-axis and legend in total:

title(sprintf('\\begin{tabular}{c} %s %s %s \\end{tabular}','$$\Delta$$ ','\\','under title'),...
    'interpreter','latex','fontsize',16)
ylabel('$$\Delta$$ = $$\frac{top}{bottom}$$','Interpreter','latex','fontsize',16);xtickangle(45)
legend({'= mean'},'fontsize',10);legend boxoff;

Don't mind the text i put in for the title, i changed it for specific reasons.. ;-)

jonas
jonas il 28 Mar 2018
Hello!
I'm not sure that I fully understand the problem. The size of the ticklabels can be changed by adjusting the 'fontsize' of the current axis. What exactly is the issue?
Twevers
Twevers il 28 Mar 2018
Dear Jonas,
My stupidity has surprised me.... i misplaced the " set(gca,'fontsize',15)" command.....
I tested it and it works now. Thanks!
jonas
jonas il 28 Mar 2018
We've all been there, happy that it worked out :)

Accedi per commentare.

Risposte (0)

Richiesto:

il 27 Mar 2018

Commentato:

il 28 Mar 2018

Community Treasure Hunt

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

Start Hunting!

Translated by