学习历程分享 http://blog.sciencenet.cn/u/xyxygood

博文

EXPORTFIG 函数的参数

已有 2764 次阅读 2011-9-3 10:55 |个人分类:论文相关|系统分类:科研笔记|关键词:学者

 EXPORTFIG  Export a figure.
    EXPORTFIG(H, FILENAME) writes the figure H to FILENAME.  H is
    a figure handle and FILENAME is a string that specifies the
    name of the output file.
 
    EXPORTFIG(H, FILENAME, OPTIONS) writes the figure H to FILENAME
    with options initially specified by the structure OPTIONS. The
    field names of OPTIONS must be legal parameters listed below
    and the field values must be legal values for the corresponding
    parameter. Default options can be set in releases prior to R12
    by storing the OPTIONS structure in the root object's appdata
    with the command 
       setappdata(0,'exportfigdefaults', OPTIONS) 
    and for releases after R12 by setting the preference with the
    command 
       setpref('exportfig', 'defaults', OPTIONS) 
 
    EXPORTFIG(...,PARAM1,VAL1,PARAM2,VAL2,...) specifies
    parameters that control various characteristics of the output
    file. Any parameter value can be the string 'auto' which means
    the parameter uses the default factory behavior, overriding
    any other default for the parameter.
 
    Format Paramter:
      'Format'  a string
           specifies the output format. Defaults to 'eps'. For a
           list of export formats type 'help print'.
      'Preview' one of the strings 'none', 'tiff'
           specifies a preview for EPS files. Defaults to 'none'.
 
    Size Parameters:
      'Width'   a positive scalar
           specifies the width in the figure's PaperUnits
      'Height'  a positive scalar
           specifies the height in the figure's PaperUnits
      'Bounds' one of the strings 'tight', 'loose'
           specifies a tight or loose bounding box. Defaults to 'tight'.
      'BoundsCode' one of the strings 'internal', 'mcode'
           specifies whether to use the internal EPS code or
           general m-code for computing bounding boxes. Defaults to
           'internal'.
      'Reference' an axes handle or a string
           specifies that the width and height parameters
           are relative to the given axes. If a string is
           specified then it must evaluate to an axes handle.
 
      Specifying only one dimension sets the other dimension
      so that the exported aspect ratio is the same as the
      figure's or reference axes' current aspect ratio. 
      If neither dimension is specified the size defaults to 
      the width and height from the figure's or reference
      axes' size. Tight bounding boxes are only computed for
      2-D views and in that case the computed bounds enclose all
      text objects.
            
    Rendering Parameters:
      'Color'     one of the strings 'bw', 'gray', 'cmyk'
          'bw'    specifies that lines and text are exported in
                  black and all other objects in grayscale
          'gray'  specifies that all objects are exported in grayscale
          'rgb'   specifies that all objects are exported in color
                  using the RGB color space
          'cmyk'  specifies that all objects are exported in color
                  using the CMYK color space
      'Renderer'  one of 'painters', 'zbuffer', 'opengl'
          specifies the renderer to use
      'Resolution'   a positive scalar
          specifies the resolution in dots-per-inch.
      'LockAxes'  one of 0 or 1
          specifies that all axes limits and ticks should be fixed
          while exporting.
      
      The default color setting is 'bw'.
 
    Font Parameters:
      'FontMode'     one of the strings 'scaled', 'fixed'
      'FontSize'     a positive scalar
           in 'scaled' mode multiplies with the font size of each
           text object to obtain the exported font size
           in 'fixed' mode specifies the font size of all text
           objects in points
      'DefaultFixedFontSize' a positive scalar
           in 'fixed' mode specified the default font size in
           points
      'FontSizeMin' a positive scalar
           specifies the minimum font size allowed after scaling
      'FontSizeMax' a positive scalar
           specifies the maximum font size allowed after scaling
      'FontEncoding' one of the strings 'latin1', 'adobe'
           specifies the character encoding of the font
      'SeparateText' one of 0 or 1
           specifies that the text objects are stored in separate
           file as EPS with the base filename having '_t' appended.
 
      If FontMode is 'scaled' but FontSize is not specified then a
      scaling factor is computed from the ratio of the size of the
      exported figure to the size of the actual figure.
 
      The default 'FontMode' setting is 'scaled'.
 
    Line Width Parameters:
      'LineMode'     one of the strings 'scaled', 'fixed'
      'LineWidth'    a positive scalar
      'DefaultFixedLineWidth' a positive scalar
      'LineWidthMin' a positive scalar
           specifies the minimum line width allowed after scaling
      'LineWidthMax' a positive scalar
           specifies the maximum line width allowed after scaling
      The semantics of 'Line' parameters are exactly the
      same as the corresponding 'Font' parameters, except that
      they apply to line widths instead of font sizes.
 
    Style Map Parameter:
      'LineStyleMap'    one of [], 'bw', or a function name or handle
           specifies how to map line colors to styles. An empty
           style map means styles are not changed. The style map
           'bw' is a built-in mapping that maps lines with the same
           color to the same style and otherwise cycles through the
           available styles. A user-specified map is a function
           that takes as input a cell array of line objects and
           outputs a cell array of line style strings. The default
           map is [].
       
    Examples:
      exportfig(gcf,'fig1.eps','height',3);
        Exports the current figure to the file named 'fig1.eps' with
        a height of 3 inches (assuming the figure's PaperUnits is 
        inches) and an aspect ratio the same as the figure's aspect
        ratio on screen.
 
      opts = struct('FontMode','fixed','FontSize',10,'height',3);
      exportfig(gcf, 'fig2.eps', opts, 'height', 5);
        Exports the current figure to 'fig2.eps' with all
        text in 10 point fonts and with height 5 inches.
 
    See also previewfig, applytofig, restorefig, print.


https://m.sciencenet.cn/blog-408189-482434.html

上一篇:OSA Style Guides
下一篇:AO的修改流程

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-24 03:55

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部