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
      cmd = ['print -depsc ',filename];
% For PDF format: 
%     cmd = ['print -dpdf ',filename];
% For PNG format:
%     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 © 2024-09-03 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA