Index: trunk/Ohana/src/opihi/cmd.data/limits.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/limits.c	(revision 40291)
+++ trunk/Ohana/src/opihi/cmd.data/limits.c	(revision 42389)
@@ -61,4 +61,5 @@
     APPLY = TRUE;
   }
+
   char *name = NULL;
   if ((N = get_argument (argc, argv, "-n"))) {
@@ -67,7 +68,16 @@
     remove_argument (N, &argc, argv);
   }
-
   if (!GetGraph (&graphmode, &kapa, name)) return (FALSE);
   FREE (name);
+
+  // this is not super intuitive
+  if ((N = get_argument (argc, argv, "-boxsize"))) {
+    remove_argument (N, &argc, argv);
+    float dx, dy;
+    // ask kapa for the size of the graph region in pixels
+    KapaGetLimits (kapa, &dx, &dy);
+    set_variable ("KAPA_XPIX", fabs(dx));
+    set_variable ("KAPA_YPIX", fabs(dy));
+  }
 
   // XXX need an option to set the limits based on the current image bounds
@@ -169,2 +179,15 @@
   return (TRUE);
 }
+
+/* -minX value : the minimum X axis value will be no higher than this value
+   -maxX value : the maximum X axis value will be no lower than this value
+   -delX value : the range of the X axis will be at least this value
+
+   These can be used to prevent the range from collapsing.  
+   These are only used if the -a option is supplied, otherwise the supplied or auto-calculated 
+   ranges are used (this seems like an poor choice)
+
+*/
+
+
+   
