From 820aebfa5efe670e320a0f57078556943032a7bc Mon Sep 17 00:00:00 2001
From: Andreas Freise <adf@star.bham.ac.uk>
Date: Fri, 4 Dec 2015 20:01:59 +0000
Subject: [PATCH] fixing problem with \u in unicode strings and remove warning
 about depreciated color cycler

---
 pykat/plotting.py | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/pykat/plotting.py b/pykat/plotting.py
index 2f91198..75a3950 100644
--- a/pykat/plotting.py
+++ b/pykat/plotting.py
@@ -46,19 +46,22 @@ def init_pykat_plotting(mode="display", dpi=100):
         pgf_with_pdflatex = {
             "pgf.texsystem": "pdflatex",
             "pgf.preamble": [
-                 r"\usepackage{amsmath, amssymb}",
-                 r"\usepackage{mathtools, siunitx}" ,
-                 r"\usepackage{amsmath}",
-                 r"\usepackage[utf8x]{inputenc}",
-                 r"\usepackage[T1]{fontenc}"
+                 r"\\usepackage{amsmath, amssymb}",
+                 r"\\usepackage{mathtools, siunitx}" ,
+                 r"\\usepackage{amsmath}",
+                 r"\\usepackage[utf8x]{inputenc}",
+                 r"\\usepackage[T1]{fontenc}"
                  ]
         }
 
         mpl.rcParams.update(pgf_with_pdflatex)
     else:
         raise(BaseException("Plotting mode must be either 'display' or 'paper'."))
-        
-    mpl.rcParams['axes.color_cycle'] = ['b', 'r', 'k', 'g', 'c', 'm', 'y']
+
+    if (mpl.__version__ < '1.5'):
+        mpl.rcParams['axes.color_cycle'] = ['b', 'r', 'k', 'g', 'c', 'm', 'y']
+    else:
+        mpl.rcParams['axes.prop_cycle']=mpl.cycler('color', ['b', 'r', 'k', 'g', 'c', 'm', 'y'])
     mpl.rcParams['lines.linewidth'] = 1.2
     mpl.rcParams.update({"figure.figsize": (6, 3.708)})
     mpl.rcParams.update({'font.size': 11})
@@ -98,4 +101,4 @@ def figure(width="full", height=0.618, textwidth=6, **kwargs):
     
     
     
-    
\ No newline at end of file
+    
-- 
GitLab