Figure Saving Tool (PDF and EPS): Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
(Created page with ';File: saver.m ;Description: A tool to save a figure exactly as it is displayed on screen (wysiwyg) ;Usage: saver(name,fignumber,path,print eps(1=yes/0=no)) defa…')
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Matlab tools|Back to Matlab Tools]]
;Files:
Note: Wikipedia automatically changes the first letter of a filename to uppercase. To avoid warnings in Matlab, save the file in lowercase.
;[[File: saver.m]]
;[[File: saver.m]]
;[[File: export_fig.zip]]
First install the export_fig toolbox in a folder that is in the Matlab path. The export_fig toolbox can save dashed and dotted lines in a proper way, which is not possible using the standard Matlab 'print' function.


;Description: A tool to save a figure exactly as it is displayed on screen (wysiwyg)
;Description: A tool to save a figure exactly as it is displayed on screen (wysiwyg)
   
    Usage:  saver(name,fignumber,path,filetype)
    Inputs:  name:      name of the file (without extension)
            fignumber: (optional) figure number (default: current figure)
            path:      (optional) where to save the file (default: current dir)
            filetype:  (optional) which filetype e.g. 'pdf', 'eps', 'png', etc. (default: '.pdf')
   
    Outputs: name.pdf (or different extension if chosen)
Saves figure(fig) to ''name.pdf'' in the current directory (or in path). The actual work is done by the export_fig toolbox. However, saver.m provides an easy way to use this tool. For example it sets the background color to white and provides an simple way to control where the figure is saved. Especially useful in combination with the print preparation tool (setplot.m)


;Usage:
    saver(name,fignumber,path,print eps(1=yes/0=no))
    default fignumber: current figure
    default path: current dir
    default print eps: 0


;Author: Rob Hoogendijk
;Author: Rob Hoogendijk

Latest revision as of 14:27, 15 October 2013

Back to Matlab Tools


Files

Note: Wikipedia automatically changes the first letter of a filename to uppercase. To avoid warnings in Matlab, save the file in lowercase.

File:Saver.m
File:Export fig.zip

First install the export_fig toolbox in a folder that is in the Matlab path. The export_fig toolbox can save dashed and dotted lines in a proper way, which is not possible using the standard Matlab 'print' function.


Description
A tool to save a figure exactly as it is displayed on screen (wysiwyg)
   Usage:   saver(name,fignumber,path,filetype)

   Inputs:  name:      name of the file (without extension)
            fignumber: (optional) figure number (default: current figure)
            path:      (optional) where to save the file (default: current dir)
            filetype:  (optional) which filetype e.g. 'pdf', 'eps', 'png', etc. (default: '.pdf')
   
   Outputs: name.pdf (or different extension if chosen)

Saves figure(fig) to name.pdf in the current directory (or in path). The actual work is done by the export_fig toolbox. However, saver.m provides an easy way to use this tool. For example it sets the background color to white and provides an simple way to control where the figure is saved. Especially useful in combination with the print preparation tool (setplot.m)


Author
Rob Hoogendijk