Heba Mohsen
Heba Mohsen

Reputation: 125

Edit the font size of categorial values in bar graphs?

I have 5 categorical data that I want to reduce the font size of them since they are too long. Any suggestion how reduce the font size of categorical data not the x label?

name={'Publish request';'Recieve Requests';'Submit response values';'Submit payment;'Run payment fun.'};
y=[443193   284225;
 97320    11680 ;
 395093   262317 ;
 340155      221075;
 42404       20940]

bar_handle=bar(y);

Upvotes: 0

Views: 128

Answers (1)

GeoMSI
GeoMSI

Reputation: 144

You should create a text object and modify the fontsize property,

name={'Publish request';'Recieve Requests';'Submit response values';'Submit payment';'Run payment fun.'};
y=[443193   284225;
   97320    11680 ;
   395093   262317 ;
   340155   221075;
   42404    20940];

bar_handle=bar(y);
ylim([0 475000])
x_name=[1:5]-0.35;
y_name=y(:,1)+10000;
text(x_name,y_name,name,'fontsize',8)

Upvotes: 1

Related Questions