Changeset 15310


Ignore:
Timestamp:
06/21/13 20:56:30 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: updating export_fig to latest version

Location:
issm/trunk-jpl/externalpackages/export_fig
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/externalpackages/export_fig/license.txt

    r11803 r15310  
    22All rights reserved.
    33
    4 Redistribution and use in source and binary forms, with or without 
    5 modification, are permitted provided that the following conditions are 
     4Redistribution and use in source and binary forms, with or without
     5modification, are permitted provided that the following conditions are
    66met:
    77
    8     * Redistributions of source code must retain the above copyright 
     8    * Redistributions of source code must retain the above copyright
    99      notice, this list of conditions and the following disclaimer.
    10     * Redistributions in binary form must reproduce the above copyright 
    11       notice, this list of conditions and the following disclaimer in 
     10    * Redistributions in binary form must reproduce the above copyright
     11      notice, this list of conditions and the following disclaimer in
    1212      the documentation and/or other materials provided with the distribution
    13      
    14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
    15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
    16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
    17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
    18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
    19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
    20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
    21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
    23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
     13
     14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     15AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     16IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     17ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     18LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     19CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     20SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     21INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     22CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     23ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    2424POSSIBILITY OF SUCH DAMAGE.
  • TabularUnified issm/trunk-jpl/externalpackages/export_fig/print2eps.m

    r14174 r15310  
    2121%   options - Additional parameter strings to be passed to print.
    2222
    23 % Copyright (C) Oliver Woodford 2008-2012
     23% Copyright (C) Oliver Woodford 2008-2013
    2424
    2525% The idea of editing the EPS file to change line styles comes from Jiro
     
    4848%           sizes we don't want, due to listeners. Thanks to Malcolm Hudson
    4949%           for reporting the issue.
     50% 22/03/13: Extend font swapping to axes labels. Thanks to Rasmus Ischebeck
     51%           for reporting the issue.
    5052
    5153function print2eps(name, fig, varargin)
     
    6163end
    6264% Find all the used fonts in the figure
    63 font_handles = findobj(fig, '-property', 'FontName');
     65font_handles = findall(fig, '-property', 'FontName');
    6466fonts = get(font_handles, 'FontName');
    6567if ~iscell(fonts)
  • TabularUnified issm/trunk-jpl/externalpackages/export_fig/user_string.m

    r10635 r15310  
    1919%   saved - Boolean indicating whether the save was succesful
    2020
    21 % Copyright (C) Oliver Woodford 2011
     21% Copyright (C) Oliver Woodford 2011-2013
    2222
    2323% This method of saving paths avoids changing .m files which might be in a
     
    2626% the version control system. Thank you to Jonas Dorn for suggesting this
    2727% approach.
     28
     29% 10/01/2013 - Access files in text, not binary mode, as latter can cause
     30% errors. Thanks to Christian for pointing this out.
    2831
    2932function string = user_string(string_name, string)
     
    5861    end
    5962    % Write the file
    60     fid = fopen(string_name, 'w');
     63    fid = fopen(string_name, 'wt');
    6164    if fid == -1
    6265        string = false;
     
    6467    end
    6568    try
    66         fwrite(fid, string, '*char');
     69        fprintf(fid, '%s', string);
    6770    catch
    6871        fclose(fid);
     
    7477else
    7578    % Get string
    76     fid = fopen(string_name, 'r');
     79    fid = fopen(string_name, 'rt');
    7780    if fid == -1
    7881        string = '';
    7982        return
    8083    end
    81     string = fread(fid, '*char')';
     84    string = fgetl(fid);
    8285    fclose(fid);
    8386end
Note: See TracChangeset for help on using the changeset viewer.