Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


Saving Plots to Disk: saveplot.m

Figure J.3: Matlab/Octave function for saving a plot to disk.

 
function saveplot(filename)
% SAVEPLOT - Save current plot to disk in a .png file.

cmd = ['print -dpng ',filename]; % .png graphics format
% For monochrome PostScript format: 
%     cmd = ['print -deps ',filename];
% For color PostScript format: 
%     cmd = ['print -depsc ',filename];
% Etc. - say 'help print' in either Matlab or Octave
disp(cmd); eval(cmd);


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (September 2007 Edition).
Copyright © 2014-03-23 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA