[GRASS-SVN] r72529 - grass/trunk/gui/wxpython/tplot

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 23 08:13:16 PDT 2018


Author: lucadelu
Date: 2018-03-23 08:13:16 -0700 (Fri, 23 Mar 2018)
New Revision: 72529

Modified:
   grass/trunk/gui/wxpython/tplot/frame.py
Log:
g.gui.tplot: fixed bug with strds and csv output

Modified: grass/trunk/gui/wxpython/tplot/frame.py
===================================================================
--- grass/trunk/gui/wxpython/tplot/frame.py	2018-03-23 14:53:38 UTC (rev 72528)
+++ grass/trunk/gui/wxpython/tplot/frame.py	2018-03-23 15:13:16 UTC (rev 72529)
@@ -647,7 +647,7 @@
     def _writeCSV(self, x, y):
         """Used to write CSV file of plotted data"""
         import csv
-        if len(y) > 1:
+        if isinstance(y[0], list):
             zipped = zip(x, *y)
         else:
             zipped = zip(x, y)
@@ -661,6 +661,7 @@
         
     def drawR(self):
         ycsv = []
+        xcsv = []
         for i, name in enumerate(self.datasetsR):
             name = name[0]
             # just name; with mapset it would be long
@@ -668,7 +669,6 @@
             self.yticksPos.append(1)  # TODO
             xdata = []
             ydata = []
-            xcsv = []
             for keys, values in self.timeDataR[name].iteritems():
                 if keys in ['temporalType', 'granularity', 'validTopology',
                             'unit', 'temporalDataType']:



More information about the grass-commit mailing list