forked from chebfun/chebfun
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathATAPformats.m
45 lines (38 loc) · 1.6 KB
/
ATAPformats.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function ATAPformats(flag)
%ATAPFORMATS Set default formats for Trefethen's book
% "Approximation Theory and Approximation Practice"
%
% ATAPFORMATS sets certain default properties and is called at the beginning of
% each section of the book so that the output from "publish" has a pleasing
% appearance. It is included in this directory as part of the Chebfun
% distribution so that readers of the book need only download Chebfun to be able
% to execute each section.
%
% ATAPFORMATS('factory') will reset these defaults to the MATLAB default state.
% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.
if ( nargin == 0 )
% Change to the ATAP settings.
evalin('caller', 'clear all')
close all
set(0, 'defaultfigureposition', [380 320 540 200]);
set(0, 'defaultaxeslinewidth', 0.9);
set(0, 'defaultaxesfontsize', 8);
set(0, 'defaultlinelinewidth', 1.1);
set(0, 'defaultpatchlinewidth', 1.1);
set(0, 'defaultlinemarkersize', 15);
format compact
format long
chebfunpref.setDefaults('factory');
elseif ( any(strcmpi(flag, {'reset', 'factory'})) )
% Revert to MATLAB factory values.
close all
set(0, 'defaultfigureposition', 'factory');
set(0, 'defaultaxeslinewidth', 'factory');
set(0, 'defaultaxesfontsize', 'factory');
set(0, 'defaultlinelinewidth', 'factory');
set(0, 'defaultpatchlinewidth', 'factory');
set(0, 'defaultlinemarkersize', 'factory');
chebfunpref.setDefaults('factory');
end
end