Colorbar font size decreases upon export

20 views (last 30 days)
When I export my contours with colorbar labels, the font size is being decreased. Take, for example:
testx = 1:10; testy = 1:10; testc = [1:10].*ones(10,10);
c = colorbar; c.Label.String = 'string'; c.Label.FontSize = 14;
Make this figure, go to File > Export setup > Export (I'm exporting to .eps) and the colorbar label will shrink. I have found other answer that would let me maintain a minimum size for ALL text, but I'd like the tick labels to remain small. Is there a way to prevent this?

Accepted Answer

ANKUR KUMAR on 13 Mar 2021
Edited: Image Analyst on 15 Mar 2021
Instead of manually saving the figure, you can prefer to save figure by command. It won't shrink the figure.
Refer to this for reference.
Daniel on 15 Mar 2021
Update: I tried the print method on some other plots and they maintain some white space around the edges. Perhaps it has something to do with my legend placement? That's the main difference I see.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 15 Mar 2021
Have you tried exportgraphics(), if youre using r2020a or later? Or try using saveas().
  1 Comment
Daniel on 15 Mar 2021
exportgraphics worked well, though I don't have access to r2020a for all my codes.

Sign in to comment.


Find more on Printing and Saving 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!