Index: /misc/tools/plotcsv/installer/plotcsv.nsi
===================================================================
--- /misc/tools/plotcsv/installer/plotcsv.nsi	(revision 6355)
+++ /misc/tools/plotcsv/installer/plotcsv.nsi	(revision 6356)
@@ -1,4 +1,4 @@
 !define PRODUCT_NAME "plotcsv"
-!define PRODUCT_VERSION "0.1"
+!define PRODUCT_VERSION "0.2"
 !define ICON_FILE "plotcsv.ico"
 
Index: /misc/tools/plotcsv/plotcsv.py
===================================================================
--- /misc/tools/plotcsv/plotcsv.py	(revision 6355)
+++ /misc/tools/plotcsv/plotcsv.py	(revision 6356)
@@ -13,9 +13,22 @@
 import time
 import getopt
-import pylab
 try:
     import cpickle
 except:
     import pickle
+
+try:
+    import pylab
+except ImportError:
+    import tkinter_error
+    msg = ('Sorry, you have to install matplotlib.\n'
+           'Get it from either:\n'
+           r'   N:\georisk\downloads\matplotlib, or' '\n'
+           '   [http://matplotlib.sourceforge.net/].\n\n'
+           'You will also need to have numpy installed:\n'
+           r'   N:\georisk\downloads\numpy')
+    tkinter_error.tkinter_error(msg)
+    print msg
+    sys.exit(1)
 
 try:
@@ -40,5 +53,5 @@
 # program name and version
 APP_NAME = 'plotcsv'
-APP_VERSION = '0.1'
+APP_VERSION = '0.2'
 
 # name of the configuration filename
@@ -59,5 +72,5 @@
 BOX_CSV_HEIGHT = 265
 BOX_PLOT_WIDTH = 400
-BOX_PLOT_HEIGHT = 90
+BOX_PLOT_HEIGHT = 140
 
 TXT_CSVFILE_WIDTH = 390
@@ -70,5 +83,5 @@
 
 FORM_WIDTH = BOX_WIDTH + 15
-FORM_HEIGHT = 405
+FORM_HEIGHT = 455
 
 START_YOFFSET = 7
@@ -291,5 +304,5 @@
 # @param x_hdr The X axis label string.
 # @param y_hdr The Y axis label string.
-def plot_files(filenames, x_hdr, y_hdr):
+def plot_files(filenames, x_hdr, y_hdr, title='', legend=False):
     pylab.rc('axes', linewidth=2)
     pylab.xlabel(x_hdr.title())
@@ -301,9 +314,12 @@
         pylab.plot(x_data, y_data)
 
-    (min_y, max_y) = pylab.ylim()
-    range_y = max_y - min_y
-    add_y = float(range_y) / 5
-    pylab.ylim((min_y, max_y+add_y))
-    pylab.legend(filenames, 'upper left')
+    if title:
+        pylab.title(title)
+    if legend:
+        (min_y, max_y) = pylab.ylim()
+        range_y = max_y - min_y
+        add_y = float(range_y) / 5
+        pylab.ylim((min_y, max_y+add_y))
+        pylab.legend(filenames, 'upper left')
 
     pylab.show()
@@ -369,5 +385,17 @@
         self.cbYColHdr = wx.Choice(p, -1, pos=(x+65, Y_OFFSET), size=(80, -1))
         self.YColHdr = []
-
+        Y_OFFSET += GEN_DELTAY*2
+
+        self.chkLegend = wx.CheckBox(p, -1, " Show graph legend",
+                                     pos=(COLLAB_X_OFFSET, Y_OFFSET))
+        
+        Y_OFFSET += GEN_DELTAY
+        wx.StaticText(p, -1, 'Title',
+                      pos=(18, Y_OFFSET+LAB_CTRL_OFFSET+2), style=wx.ALIGN_LEFT)
+        self.txtTitle = wx.TextCtrl(p, -1, "", size=(350, -1),
+                                    pos=(COLLAB_X_OFFSET+20,
+                                         Y_OFFSET+LAB_CTRL_OFFSET),
+                                    style=wx.ALIGN_LEFT)
+        
         Y_OFFSET += BUTTON_HEIGHT + MARGIN
         x = FORM_WIDTH/2 - BUTTON_WIDTH/2
@@ -438,4 +466,6 @@
         self.cfg['YColHdrSelection'] = self.cbYColHdr.GetSelection()
         self.cfg['file_dir'] = self.file_dir
+        self.cfg['GraphTitle'] = self.txtTitle.GetValue()
+        self.cfg['GraphLegend'] = self.chkLegend.GetValue()
 
         self.cfg.save()
@@ -473,4 +503,10 @@
         if self.YColHdrSelection >= 0:
             self.cbYColHdr.SetSelection(self.YColHdrSelection)
+        title = self.cfg['GraphTitle']
+        if title is None:
+            title = ''
+        self.txtTitle.SetValue(title)
+        if self.cfg['GraphLegend']:
+            self.chkLegend.SetValue(True)
 
     def getHeaders(self, filename):
@@ -556,5 +592,7 @@
 
         if selected_x and selected_y:
-            plot_files(self.CSVFiles, selected_x, selected_y) 
+            plot_files(self.CSVFiles, selected_x, selected_y,
+                       title=self.txtTitle.GetValue(),
+                       legend=self.chkLegend.GetValue()) 
             
     def error(self, msg):
