config-default.py 1.93 KB
Newer Older
1
from .mpl_data import MplData
2
3
4
5
6
7
8
9
10
11
from matplotlib import rcParams

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

# CONFIGURATION --------------------------------------------------------
12
13
CONTEXT= 'CLIENT'

14
# myFig
15
16
17
18
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
Philipp Gast's avatar
Philipp Gast committed
19
D_RAWDATA = MplData()        # default raw data
20
D_INPUTARG = 'current'      # default Input argument
21
22

# myIOs
23
D_IPATH = '../'             # default path to project
24
25

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

# Debug
30
D_DEBUG = True              # default debug value
31
32

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

# FONT
rcParams['font.family'] = 'serif'
rcParams['font.size'] = '22'
try:
    rcParams['text.usetex'] = True  # need dvipng, ghostscript, and Agg
41
except Exception:
42
    print(WARN + "I could not set the LaTeX font sorry...")
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

# 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
66
except Exception:
67
68
69
70
    pass

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