Commit 43ec817a authored by Yori Fournier's avatar Yori Fournier
Browse files

Merge branch 'add-specific-config' into 'dev'

Add specific config

See merge request !26
parents 4426fd36 b81a03c3
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 -----------------------------------------------
# BACKEND: u'TKAgg', u'GTKAgg', u'WXAgg'
rcParams['backend'] = u'GTKAgg'
# FONT
rcParams['font.family'] = 'serif'
rcParams['font.size'] = '22'
try:
rcParams['text.usetex'] = False # need dvipng, ghostscript, and Agg
except:
print(WARN + "I couls not set the LaTeX font sorry...")
# 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
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 -----------------------------------------------
# DPI
rcParams['figure.dpi'] = 75.0
......@@ -61,7 +61,8 @@ from matplotlib.backends.backend_tkagg import FigureManagerTkAgg, FigureCanvasTk
# Test mpl version:
from matplotlib import __version__ as mplvers
if int(mplvers.replace('.','')) < 150 :
if int(mplvers.replace('.','')[:3]) < 150 :
import six
from six.moves import tkinter as Tk
else :
......
......@@ -18,3 +18,5 @@ from .tests import test505, test506, test507, test508, test509
from .tests import test510, test511
from .tests import test600
# for the demos
from ..mytool import print2screen
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment