Index: /trunk/tools/drawing_tools.py
===================================================================
--- /trunk/tools/drawing_tools.py	(revision 980)
+++ /trunk/tools/drawing_tools.py	(revision 981)
@@ -5647,5 +5647,6 @@
     return
 
-def plot_lines(vardv, varvv, vaxis, dtit, linesn, vtit, vunit, gtit, gloc, kfig):
+def plot_lines(vardv, varvv, vaxis, dtit, linesn, vtit, vunit, gtit, gloc, cs, ls,   \
+  ps, ws, ss, fv, fign, kfig):
     """ Function to plot a collection of lines
       vardv= list of set of dimension values
@@ -5661,7 +5662,14 @@
         5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',
         9: 'upper center', 10: 'center'
+      cs= list of color names
+      ls= list of style of lines
+      ps= list of style of points
+      ws= list of withs of lines
+      ss= list of size of points
+      fv= frequency of values
+      fign= name of the figure
       kfig= kind of figure
       plot_lines([np.arange(10)], [np.sin(np.arange(10)*np.pi/2.5)], 'y', 'time (s)',      \
-  ['2.5'], 'sin', '-', 'sinus frequency dependency', 'pdf')
+  ['2.5'], 'sin', '-', 'sinus frequency dependency', 'sinus', 'pdf')
     """
     fname = 'plot_lines'
@@ -5673,11 +5681,7 @@
 
 # Canging line kinds every 7 lines (end of standard colors)
-    linekinds=['.-','x-','o-']
-    pointkindsauto=['.', ',', 'x', 'o', '*', '+', '<', '|', '_', '>', '1', '8', 's', \
-      'p', 'h', 'D']
-
     Ntraj = len(vardv)
 
-    N7lines = 0
+    cols, lins, pts, lws, pss = ColorsLinesPointsStyles(Ntraj, cs, ls, ps, ws, ss, fv)
 
     xmin = 100000.
@@ -5702,6 +5706,6 @@
     if vaxis == 'x':
         for il in range(Ntraj):
-            plt.plot(varvv[il], vardv[il], linekinds[N7lines], label= linesn[il])
-            if il == 6: N7lines = N7lines + 1
+            plt.plot(varvv[il], vardv[il], lins[il], marker=pts[il],                 \
+              linewidth=lws[il], markersize=pss[il], label= linesn[il], color=cols[il])
 
         plt.xlabel(vtit + ' (' + vunit + ')')
@@ -5712,6 +5716,6 @@
     else:
         for il in range(Ntraj):
-            plt.plot(vardv[il], varvv[il], linekinds[N7lines], label= linesn[il])
-            if il == 6: N7lines = N7lines + 1
+            plt.plot(vardv[il], varvv[il], lins[il], marker=pts[il],                 \
+              linewidth=lws[il], markersize=pss[il], label= linesn[il], color=cols[il])
 
         plt.xlabel(dtit)
@@ -5721,5 +5725,4 @@
         plt.ylim(xmin,xmax)
 
-    figname = 'lines'
     graphtit = gtit.replace('_','\_').replace('&','\&')
 
@@ -5727,5 +5730,5 @@
     plt.legend(loc=gloc)
     
-    output_kind(kfig, figname, True)
+    output_kind(kfig, fign, True)
 
     return
@@ -5766,6 +5769,6 @@
         Ncols = len(colorsauto)
         for ic in range(Nstyles):
-            iic = np.mod(ic,Ncols) - 1
-            if iic == 0: iic = Ncols - 1
+            imc = int(ic/Ncols)
+            iic = ic - imc * Ncols
             usecolors.append(colorsauto[iic])
     else:
@@ -5786,6 +5789,6 @@
         Nklns = len(linekindsauto)
         for il in range(Nstyles):
-            iil = np.mod(il,Nklns) - 1
-            if iil == 0: iil = Nklns - 1
+            iml = int(il/Nklns)
+            iil = il - iml * Nklns
             uselines.append(linekindsauto[iil])
     else:
@@ -5806,6 +5809,6 @@
         Nkpts = len(pointkindsauto)
         for ip in range(Nstyles):
-            iip = np.mod(ip,Nkpts) - 1
-            if iip == 0: iip = Nkpts - 1
+            imc = int(ip/Nkpts)
+            iip = ip - imc * Nkpts
             usepoints.append(pointkindsauto[iip])
     else:
@@ -5826,6 +5829,6 @@
         Nwlns = len(linewidthsauto)
         for il in range(Nstyles):
-            iil = np.mod(il,Nwlns) - 1
-            if iil == 0: iil = Nwlns - 1
+            iml = int(il/Nwlns)
+            iil = il - iml * Nwlns
             usewlines.append(linewidthsauto[iil])
     else:
@@ -5846,6 +5849,6 @@
         Nspts = len(pointsizesauto)
         for ip in range(Nstyles):
-            iip = np.mod(ip,Nspts) - 1
-            if iip == 0: iip = Nspts - 1
+            ipc = int(ip/Nspts)
+            iip = ip - ipc * Nspts
             usespoints.append(pointsizesauto[iip])
     else:
@@ -5884,5 +5887,6 @@
 
 #Nstyles = 3
-#colors = ['blue']
+##colors = ['blue']
+#colors = None
 #lines = ['-']
 #points = ['x', '*', 'o']
@@ -5999,5 +6003,5 @@
     if vardv == 'h':
         print fname + '_____________________________________________________________'
-        print plot_lines.__doc__
+        print plot_lines_time.__doc__
         quit()
 
