Changeset 15310
- Timestamp:
- 06/21/13 20:56:30 (12 years ago)
- 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 2 2 All rights reserved. 3 3 4 Redistribution and use in source and binary forms, with or without 5 modification, are permitted provided that the following conditions are 4 Redistribution and use in source and binary forms, with or without 5 modification, are permitted provided that the following conditions are 6 6 met: 7 7 8 * Redistributions of source code must retain the above copyright 8 * Redistributions of source code must retain the above copyright 9 9 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 12 12 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 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 24 24 POSSIBILITY OF SUCH DAMAGE. -
TabularUnified issm/trunk-jpl/externalpackages/export_fig/print2eps.m ¶
r14174 r15310 21 21 % options - Additional parameter strings to be passed to print. 22 22 23 % Copyright (C) Oliver Woodford 2008-201 223 % Copyright (C) Oliver Woodford 2008-2013 24 24 25 25 % The idea of editing the EPS file to change line styles comes from Jiro … … 48 48 % sizes we don't want, due to listeners. Thanks to Malcolm Hudson 49 49 % for reporting the issue. 50 % 22/03/13: Extend font swapping to axes labels. Thanks to Rasmus Ischebeck 51 % for reporting the issue. 50 52 51 53 function print2eps(name, fig, varargin) … … 61 63 end 62 64 % Find all the used fonts in the figure 63 font_handles = find obj(fig, '-property', 'FontName');65 font_handles = findall(fig, '-property', 'FontName'); 64 66 fonts = get(font_handles, 'FontName'); 65 67 if ~iscell(fonts) -
TabularUnified issm/trunk-jpl/externalpackages/export_fig/user_string.m ¶
r10635 r15310 19 19 % saved - Boolean indicating whether the save was succesful 20 20 21 % Copyright (C) Oliver Woodford 2011 21 % Copyright (C) Oliver Woodford 2011-2013 22 22 23 23 % This method of saving paths avoids changing .m files which might be in a … … 26 26 % the version control system. Thank you to Jonas Dorn for suggesting this 27 27 % 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. 28 31 29 32 function string = user_string(string_name, string) … … 58 61 end 59 62 % Write the file 60 fid = fopen(string_name, 'w ');63 fid = fopen(string_name, 'wt'); 61 64 if fid == -1 62 65 string = false; … … 64 67 end 65 68 try 66 f write(fid, string, '*char');69 fprintf(fid, '%s', string); 67 70 catch 68 71 fclose(fid); … … 74 77 else 75 78 % Get string 76 fid = fopen(string_name, 'r ');79 fid = fopen(string_name, 'rt'); 77 80 if fid == -1 78 81 string = ''; 79 82 return 80 83 end 81 string = f read(fid, '*char')';84 string = fgetl(fid); 82 85 fclose(fid); 83 86 end
Note:
See TracChangeset
for help on using the changeset viewer.