0

I have a bar chart with x-labels that are quite long.

How do I save the figure such that the labels don't get cut off like below - do I just scale it down? Also is it possible to save it as a cropped pdf to the figure and labels only so that I can use it in Latex?

enter image description here

1 Answers1

0

A possible solution could be to move up the axis (and, if needed, to reduce its size to fit in the figure).

pos = get(gca,'position');

set(gca,'position',[pos(1) pos(2) + 0.1 pos(3) * 0.95 pos(4) * 0.95])

This applies if "unit" property is set to "normalized", if not the scaling factors should be defined accordingly to the "unit" mode

You can also reduce the size of the fonts (default value should be 10)

set(gca,'fontsize',8)

Hope this helps.

il_raffa
  • 5,090
  • 129
  • 31
  • 36