-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path__init__.py
149 lines (137 loc) · 4.74 KB
/
__init__.py
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# -*- coding: iso-8859-1 -*-
"""
Sebastian's collection of scientific libraries.
DISCLAIMER
This software may be used, copied, or redistributed as long as it
is not sold and this copyright notice is reproduced on each copy
made. This routine is provided as is without any express or implied
warranties whatsoever.
AUTHOR
Sebastian Krieger
email: [email protected]
REVISION
1 (2011-08-26 17:12 -0300)
REFERENCES
"""
from __future__ import division
from os import environ
from matplotlib import cycler
from matplotlib.style import use as use_style
from time import tzset
__version__ = '$Revision: 1 $'
__author__ = 'Sebastian Krieger'
# $Source$
if False:
try:
display = environ['DISPLAY'][-2:]
except:
print 'Nooo!!!!'
display = None
#
if display != ':0':
try:
from matplotlib import use
use('Agg')
except:
print 'Warning: could not use Agg backend.'
pass
environ['TZ'] = 'UTC'
tzset()
fontsize = 'medium'
params = {
'interactive': True,
'toolbar': 'toolbar2',
'timezone': 'UTC',
'lines.linewidth': 1.0, # line width in points
'font.family': 'serif',
'font.size': 16.0,
'font.cursive': 'cursive',
'font.fantasy': ['fantasy'],
'font.monospace': ['monospace'],
'font.sans-serif': ['sans-serif'],
'font.serif': ['Times'],
'font.stretch': 'ultra-condensed',
'text.usetex': True,
'text.latex.unicode': True,
'text.latex.preamble': [
r'\usepackage{times}',
r'\usepackage{siunitx}',
r'\sisetup{detect-family=true, per-mode=reciprocal}',
# r'\usepackage{sfmath}',
r'\usepackage{amsmath}',
r'\usepackage{nicefrac}',
],
'text.color': '#555555',
'axes.facecolor': '#EEEEEE', # axes background color
'axes.edgecolor': '#BCBCBC', # axes edge color
'axes.linewidth': 1, # edge linewidth
'axes.grid': False, # display grid or not
'axes.titlesize': 'large', # fontsize of the axes title
'axes.labelsize': 'large', # fontsize of the x any y labels
'axes.labelcolor': '#555555',
'axes.axisbelow': True, # whether axis gridlines and ticks are below
'axes.prop_cycle': cycler(color=['#348ABD', '#7A68A6', '#A60628',
'#467821', '#CF4457', '#188487',
'#E24A33']),
# blue, purple, red,
# green, pink, turquoise,
# orange
'axes.unicode_minus': True,
'xtick.major.size': 8, # major tick size in points
'xtick.minor.size': 4, # minor tick size in points
'xtick.major.pad': 6, # distance to major tick label in points
'xtick.minor.pad': 6, # distance to the minor tick label in points
'xtick.color': '#555555', # color of the tick labels
'xtick.labelsize': fontsize,
'xtick.direction': 'in', # direction: in or out
'ytick.major.size': 8, # major tick size in points
'ytick.minor.size': 4, # minor tick size in points
'ytick.major.pad': 6, # distance to major tick label in points
'ytick.minor.pad': 6, # distance to the minor tick label in points
'ytick.color': '#555555', # color of the tick labels
'ytick.labelsize': fontsize,
'ytick.direction': 'in', # direction: in or out
'grid.color': '#BCBCBC',
'grid.linestyle': '-',
'grid.linewidth': 0.5,
'grid.alpha': 0.5,
'legend.fancybox': True,
'figure.figsize': [11, 8], # figure size in inches
'figure.dpi': 96, # figure dots per inch
'figure.facecolor' : '0.85', # figure facecolor; 0.75 is scalar gray
'figure.edgecolor' : '0.50', # figure edgecolor
'keymap.fullscreen': 'f', # toggling
'keymap.home': ['h', 'r', 'home'], # home or reset mnemonic
'keymap.back': ['left', 'c', 'backspace'], # forward / backward keys to enable
'keymap.forward': ['right', 'v'], # left handed quick navigation
'keymap.pan': 'p', # pan mnemonic
'keymap.zoom': 'o', # zoom mnemonic
'keymap.save': 's', # saving current figure
'keymap.grid': 'g', # switching on/off a grid in current axes
'keymap.yscale': 'l', # toggle scaling of y-axes ('log'/'linear')
'keymap.xscale': ['L', 'k'], # toggle scaling of x-axes ('log'/'linear')
'keymap.all_axes': 'a', # enable all axes
'contour.negative_linestyle': 'dashed'
}
use_style(params)
try:
reload(cm)
reload(common)
reload(dynamics)
reload(file)
reload(gis)
reload(graphics)
reload(interpolate)
reload(signal)
reload(stats)
except:
import cm
import common
import dynamics
import file
import gis
import gis as mapping
import graphics
import interpolate
import signal
import stats