Index: trunk/BNC/src/rinex/graphwin.cpp
===================================================================
--- trunk/BNC/src/rinex/graphwin.cpp	(revision 4572)
+++ trunk/BNC/src/rinex/graphwin.cpp	(revision 4573)
@@ -49,6 +49,6 @@
 t_graphWin::t_graphWin(QWidget* parent, const QString& fileName, 
                        const QVector<QWidget*>& plots,
-                       const QByteArray& scaleTitle,
-                       const QwtInterval scaleInterval) :  QDialog(parent) {
+                       const QByteArray* scaleTitle,
+                       const QwtInterval* scaleInterval) :  QDialog(parent) {
 
   _fileName = fileName;
@@ -73,21 +73,26 @@
   // Color Scale
   // -----------
-  _colorScale = new QwtScaleWidget( this );
-  _colorScale->setAlignment( QwtScaleDraw::RightScale );
-  _colorScale->setColorBarEnabled( true );
-
-   QwtText title(scaleTitle);
-   QFont font = _colorScale->font();
-   font.setBold( true );
-   title.setFont( font );
-   _colorScale->setTitle( title );
-
-   _colorScale->setColorMap(scaleInterval, new t_colorMap());
-
-   QwtLinearScaleEngine scaleEngine;
-   _colorScale->setScaleDiv(scaleEngine.transformation(),
-                            scaleEngine.divideScale(scaleInterval.minValue(), 
-                                                    scaleInterval.maxValue(), 
-                                                    8, 5));
+  if (scaleTitle && scaleInterval) {
+    _colorScale = new QwtScaleWidget( this );
+    _colorScale->setAlignment( QwtScaleDraw::RightScale );
+    _colorScale->setColorBarEnabled( true );
+    
+     QwtText title(*scaleTitle);
+     QFont font = _colorScale->font();
+     font.setBold( true );
+     title.setFont( font );
+     _colorScale->setTitle( title );
+    
+     _colorScale->setColorMap(*scaleInterval, new t_colorMap());
+    
+     QwtLinearScaleEngine scaleEngine;
+     _colorScale->setScaleDiv(scaleEngine.transformation(),
+                              scaleEngine.divideScale(scaleInterval->minValue(),
+                                                      scaleInterval->maxValue(),
+                                                      8, 5));
+  }
+  else {
+    _colorScale = 0;
+  }
 
   // Layout
@@ -98,5 +103,7 @@
     plotLayout->addWidget(plots[ip]);
   }
-  plotLayout->addWidget(_colorScale);
+  if (_colorScale) {
+    plotLayout->addWidget(_colorScale);
+  }
 
   QHBoxLayout* buttonLayout = new QHBoxLayout;
Index: trunk/BNC/src/rinex/graphwin.h
===================================================================
--- trunk/BNC/src/rinex/graphwin.h	(revision 4572)
+++ trunk/BNC/src/rinex/graphwin.h	(revision 4573)
@@ -53,6 +53,6 @@
  public:
   t_graphWin(QWidget* parent, const QString& fileName, 
-             const QVector<QWidget*>& plots, const QByteArray& scaleTitle,
-             const QwtInterval scaleInterval);
+             const QVector<QWidget*>& plots, const QByteArray* scaleTitle,
+             const QwtInterval* scaleInterval);
   ~t_graphWin();
 
Index: trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4572)
+++ trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4573)
@@ -156,5 +156,5 @@
 
     t_graphWin* graphWin = new t_graphWin(0, fileName, plots, 
-                                          scaleTitle, scaleInterval);
+                                          &scaleTitle, &scaleInterval);
 
     graphWin->show();
@@ -425,4 +425,6 @@
       }
     }
+
+    dataL1 << int(firstEpoch.gpssec());
 
     if (slipFlag) {
@@ -483,6 +485,4 @@
     (*dataSNR2) << (new t_polarPoint(az, zen, SNR2));
 
-    dataL1 << int(firstEpoch.gpssec());
-
     if (_log) {
       _log->setRealNumberNotation(QTextStream::FixedNotation);
@@ -509,3 +509,29 @@
                                      QMap<QString, QVector<int> >* prnAvail){
 
-}
+  qDebug() << fileName << title;
+
+  QMapIterator<QString, QVector<int> > it(*prnAvail);
+  while (it.hasNext()) {
+    it.next();
+    const QString&      prn    = it.key();
+    const QVector<int>& epochs = it.value();
+    qDebug() << prn << epochs.size();
+  }
+
+  bncApp* app = dynamic_cast<bncApp*>(qApp);
+  if (app->GUIenabled()) {
+
+    QVector<QWidget*> plots;
+
+    t_graphWin* graphWin = new t_graphWin(0, fileName, plots, 0, 0);
+
+    graphWin->show();
+
+    bncSettings settings;
+    QString dirName = settings.value("reqcPlotDir").toString();
+    if (!dirName.isEmpty()) {
+      QByteArray ext = "_AVAIL.png";
+      graphWin->savePNG(dirName, ext);
+    }
+  }
+}
