Skip to content

Instantly share code, notes, and snippets.

@joyhuang9473
Last active October 15, 2015 13:04
Show Gist options
  • Save joyhuang9473/38c5e1958f21dfaaf82d to your computer and use it in GitHub Desktop.
Save joyhuang9473/38c5e1958f21dfaaf82d to your computer and use it in GitHub Desktop.
figure demo with Octave
% figure demo
A = magic(5);
figure(1),imagesc(A);
title('figure 1');
print -dpng 'magicImagescInFigure1.png';
figure(2),imagesc(A),colormap gray;
title('figure 2');
print -dpng 'magicImagescGrayInFigure2.png';
% clean and close figure2
clf;
close;
% clean and close figure1
clf;
close;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment