config-default.py 1.91 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
from .myData import MyData
from matplotlib import rcParams

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

# CONFIGURATION --------------------------------------------------------
# myFig
13
14
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
D_RAWDATA = MyData()        # default raw data
D_INPUTARG = 'current'      # default Input argument
19
20

# myIOs
21
D_IPATH = '../'             # default path to project
22
23

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

# Debug
28
D_DEBUG = True              # default debug value
29
30

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

# FONT
rcParams['font.family'] = 'serif'
rcParams['font.size'] = '22'
try:
    rcParams['text.usetex'] = True  # need dvipng, ghostscript, and Agg
39
except Exception:
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

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

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