Index: trunk/BNC/src/rinex/availplot.cpp
===================================================================
--- trunk/BNC/src/rinex/availplot.cpp	(revision 4578)
+++ trunk/BNC/src/rinex/availplot.cpp	(revision 4579)
@@ -3,4 +3,5 @@
 #include <qwt_symbol.h>
 #include <qwt_plot_curve.h>
+#include <qwt_plot_grid.h>
 #include <qwt_legend.h>
 
@@ -11,5 +12,7 @@
 : QwtPlot(parent) {
 
-  setTitle("Availability Plot");
+  setTitle("Availability Plot");  
+
+  setCanvasBackground(QColor(Qt::white));
 
   // Legend
@@ -17,4 +20,12 @@
   QwtLegend* legend = new QwtLegend;
   insertLegend(legend, QwtPlot::RightLegend);
+
+
+    // grid 
+    QwtPlotGrid *grid = new QwtPlotGrid;
+    grid->enableXMin(true);
+    grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine));
+    grid->setMinPen(QPen(Qt::gray, 0 , Qt::DotLine));
+    grid->attach(this);
 
   // Axes
@@ -36,5 +47,5 @@
     double yData[epochs.size()];
     for (int ii = 0; ii < epochs.size(); ii++) {
-      xData[ii] = epochs[ii]/1.e5;
+      xData[ii] = epochs[ii];
       yData[ii] = iC;
     }
@@ -45,5 +56,5 @@
     QwtPlotCurve* curve = new QwtPlotCurve(prn);
     curve->setSymbol( symbol );
-    ///    curve->setStyle( QwtPlotCurve::NoCurve );
+    curve->setStyle( QwtPlotCurve::NoCurve );
     curve->setLegendAttribute( QwtPlotCurve::LegendShowSymbol );
     curve->setXAxis(QwtPlot::xBottom);
Index: trunk/BNC/src/rinex/graphwin.cpp
===================================================================
--- trunk/BNC/src/rinex/graphwin.cpp	(revision 4578)
+++ trunk/BNC/src/rinex/graphwin.cpp	(revision 4579)
@@ -138,4 +138,6 @@
 void t_graphWin::slotPrint() {
 
+  savePNG("./", ".PNG");
+
   QPrinter printer;
   QPrintDialog* dialog = new QPrintDialog(&printer, this);
@@ -160,6 +162,6 @@
 // Save the Widget as PNG Files
 ////////////////////////////////////////////////////////////////////////////
-void t_graphWin::savePNG(const QString& dirName, QByteArray ext,
-                         QwtPlot* plot) {
+void t_graphWin::savePNG(const QString& dirName, QByteArray ext) {
+
   if (dirName.isEmpty()) {
     return;
@@ -174,15 +176,7 @@
                    + fileInfo.completeBaseName() + ext;
 
-  if (plot) {        
-    QwtPlotRenderer renderer;
-    renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, false);
-    renderer.setLayoutFlag(QwtPlotRenderer::KeepFrames, true);
-    renderer.renderDocument(plot, fileName, QSizeF(300, 200), 85);
-  }
-  else {
-    QImage image(_canvas->size(), QImage::Format_RGB32);
-    QPainter painter(&image);
-    _canvas->render(&painter);
-    image.save(fileName,"PNG");
-  }
+  QImage image(_canvas->size(), QImage::Format_RGB32);
+  QPainter painter(&image);
+  _canvas->render(&painter);
+  image.save(fileName,"PNG");
 }
Index: trunk/BNC/src/rinex/graphwin.h
===================================================================
--- trunk/BNC/src/rinex/graphwin.h	(revision 4578)
+++ trunk/BNC/src/rinex/graphwin.h	(revision 4579)
@@ -58,5 +58,5 @@
   ~t_graphWin();
 
-  void savePNG(const QString& dirName, QByteArray ext, QwtPlot* plot);
+  void savePNG(const QString& dirName, QByteArray ext);
 
  signals:
Index: trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4578)
+++ trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4579)
@@ -41,4 +41,5 @@
 #include <iostream>
 #include <iomanip>
+#include <qwt_plot_renderer.h>
 
 #include "reqcanalyze.h"
@@ -166,5 +167,5 @@
     if (!dirName.isEmpty()) {
       QByteArray ext = scaleTitle.isEmpty() ? "_SNR.png" : "_MP.png";
-      graphWin->savePNG(dirName, ext, 0);
+      graphWin->savePNG(dirName, ext);
     }
   }
@@ -524,6 +525,6 @@
     if (!dirName.isEmpty()) {
       QByteArray ext = "_AVAIL.png";
-      graphWin->savePNG(dirName, ext, plot);
-    }
-  }
-}
+      graphWin->savePNG(dirName, ext);
+    }
+  }
+}
