Skip to content

Instantly share code, notes, and snippets.

@qiuwch
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save qiuwch/306e7ad0d33d0332226e to your computer and use it in GitHub Desktop.

Select an option

Save qiuwch/306e7ad0d33d0332226e to your computer and use it in GitHub Desktop.
Set the figure size of MATLAB
set(gcf, 'PaperPosition', [0 0 20 10]);
% PaperPosition is used for exporting figure
% PaperUnits: default inches for U.S., cm for Asia and Euro. normalized is the best choice
set(gcf, 'Position', [0 0 20 10]);
% Position is used for GUI position
% Default unit is pixels
% Units: Default pixel
xTickLabel = arrayfun(@(x) num2str(x), betas, 'UniformOutput', false);
set(gca, 'XTickLabel', xTickLabel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment