config-default.py 1.87 KB
Newer Older
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
from .myData import MyData
from matplotlib import rcParams

# FORM -----------------------------------------------------------------
INFO = " > info-: "
WARN = " > warn-: "
SEVR = " > sevr-: "
DBUG = " > dbug-: "
SPCE = " > -----: "

# CONFIGURATION --------------------------------------------------------
# myFig
D_FIGNUM    = 0          # default figure number
D_FIGSIZE   = (8., 6.)   # default figure size
D_REFORMAT  = True       # default reformat value
D_FORMATTED = False      # default formatted value
D_RAWDATA   = MyData()   # default raw data
D_INPUTARG  = 'current'  # default Input argument

# myIOs
D_IPATH     = '../'      # default path to project

# print2file
D_OPATH     = 'myplotlib/img/'  # default path to ouput
D_OFORMAT   = 'png'      # default format for ouput

# Debug
D_DEBUG     = True      # default debug value

# PLOTTING CONFIGURATION -----------------------------------------------
31
# BACKEND: u'TKAgg', u'GTKAgg', u'WXAgg', u'Qt4Agg', u'MacOSX'
32
33
34
35
36
37
38
39
rcParams['backend'] = u'WXAgg'

# FONT
rcParams['font.family'] = 'serif'
rcParams['font.size'] = '22'
try:
    rcParams['text.usetex'] = True  # need dvipng, ghostscript, and Agg
except:
40
    print(WARN + "I could not set the LaTeX font sorry...")
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

# LINES
rcParams['lines.linewidth'] = 1.5
rcParams['lines.markersize'] = 6

# AXES
rcParams['axes.linewidth'] = 1.5

# TICKS
rcParams['xtick.major.pad'] = 10.
rcParams['xtick.major.size'] = 10.
rcParams['ytick.major.pad'] = 8.
rcParams['ytick.major.size'] = 10.
rcParams['xtick.minor.size'] = 5.
rcParams['ytick.minor.size'] = 5.
# Not compatible with old version of matplotlib
try:
    rcParams['xtick.major.width'] = 1.5
    rcParams['ytick.major.width'] = 1.5
    rcParams['xtick.minor.width'] = 1.5
    rcParams['ytick.minor.width'] = 1.5
    rcParams['xtick.minor.visible'] = False
    rcParams['ytick.minor.visible'] = False
except:
    pass

# DPI
rcParams['figure.dpi'] = 75.0