How to Change the Size of a Box-Plot Label in MATLAB

  1.  Type "load carsmall" to load a sample data set included with MATLAB.
  2.  Type "boxplot(Horsepower,Origin)" to generate a box plot of auto horsepower grouped by country of origin.
  3.  Type "set(findobj(gca,'Type','text'),'fontunits','points')" to set the font units for the labels to points. Alternatively, replace "points" with "inches," "centimeters" or "pixels."
  4.  Type "set(findobj(gca,'Type','text'),'fontsize',14)" to increase the font size from the default of 12 to 14 using the units you previously specified -- or replace "13" with the size you want.

posted on 2015-08-12 22:57  Gingber  阅读(219)  评论(0编辑  收藏  举报

导航