Index: trunk/psModules/src/astrom/pmAstrometryVisual.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometryVisual.c	(revision 24818)
+++ trunk/psModules/src/astrom/pmAstrometryVisual.c	(revision 25729)
@@ -1209,6 +1209,11 @@
     KapaClearPlots (kapa2);
 
-    graphdata.color = KapaColorByName ("black");
-    graphdata.ptype = 2;
+    KapaSendLabel (kapa2, "X", KAPA_LABEL_XM);
+    KapaSendLabel (kapa2, "Y", KAPA_LABEL_YM);
+    KapaSendLabel (kapa2, "Chip Coordinates. Black = Raw Stars. Red = Ref Stars. Blue = Matched Stars", KAPA_LABEL_XP);
+
+    // X vs Y by mag (ref)
+    graphdata.color = KapaColorByName ("red");
+    graphdata.ptype = 7;
     graphdata.style = 2;
 
@@ -1217,42 +1222,7 @@
     psFree (zVec);
 
-    xVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
-    yVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
-    zVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
-
-    // X vs Y by mag (raw)
-    n = 0;
-    for (int i = 0; i < rawstars->n; i++) {
-        pmAstromObj *raw = rawstars->data[i];
-        if (!isfinite(raw->Mag)) continue;
-        if (raw->Mag < iMagMin) continue;
-        if (raw->Mag > iMagMax) continue;
-
-        xVec->data.F32[n] = raw->chip->x;
-        yVec->data.F32[n] = raw->chip->y;
-        zVec->data.F32[n] = raw->Mag;
-        n++;
-    }
-    xVec->n = yVec->n = zVec->n = n;
-
-    KapaSendLabel (kapa2, "X", KAPA_LABEL_XM);
-    KapaSendLabel (kapa2, "Y", KAPA_LABEL_YM);
-    KapaSendLabel (kapa2,
-                   "Chip Coordinates. Black = Raw Stars. Red = Ref Stars. Blue = Matched Stars"
-                   , KAPA_LABEL_XP);
-    pmVisualTriplePlot (kapa2, &graphdata, xVec, yVec, zVec, false);
-
-    // X vs Y by mag (ref)
-    psFree (xVec);
-    psFree (yVec);
-    psFree (zVec);
-
     xVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
     yVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
     zVec = psVectorAlloc (refstars->n, PS_TYPE_F32);
-
-    graphdata.color = KapaColorByName ("red");
-    graphdata.ptype = 7;
-    graphdata.style = 2;
 
     n = 0;
@@ -1269,5 +1239,5 @@
     }
     xVec->n = yVec->n = zVec->n = n;
-    pmVisualTripleOverplot (kapa2, &graphdata, xVec, yVec, zVec, false);
+    pmVisualTriplePlot (kapa2, &graphdata, xVec, yVec, zVec, false);
 
     //rescale the graph to include all points
@@ -1282,4 +1252,35 @@
     graphdata.ymax = PS_MAX(ymax, graphdata.ymax);
     KapaSetLimits (kapa2, &graphdata);
+
+    bool plotTweak;
+    pmVisualAskUser(&plotTweak);
+
+    // X vs Y by mag (raw)
+    graphdata.color = KapaColorByName ("black");
+    graphdata.ptype = 2;
+    graphdata.style = 2;
+
+    psFree (xVec);
+    psFree (yVec);
+    psFree (zVec);
+
+    xVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
+    yVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
+    zVec = psVectorAlloc (rawstars->n, PS_TYPE_F32);
+
+    n = 0;
+    for (int i = 0; i < rawstars->n; i++) {
+        pmAstromObj *raw = rawstars->data[i];
+        if (!isfinite(raw->Mag)) continue;
+        if (raw->Mag < iMagMin) continue;
+        if (raw->Mag > iMagMax) continue;
+
+        xVec->data.F32[n] = raw->chip->x;
+        yVec->data.F32[n] = raw->chip->y;
+        zVec->data.F32[n] = raw->Mag;
+        n++;
+    }
+    xVec->n = yVec->n = zVec->n = n;
+    pmVisualTripleOverplot (kapa2, &graphdata, xVec, yVec, zVec, false);
 
     //overplot matched stars in blue
