diff --git a/Common/Context.h b/Common/Context.h
index b606bf9516f226b0974353b88c135eb8a1e9b603..62d3301e2bc3aab7a4262e127960cdf881ce0baf 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -109,9 +109,10 @@ public :
   int ortho;                  // orthogonal projection? 
   int draw_bbox;              // always draw the bounding boxes?
   int fast_redraw;            // only draw the bbox when rotating/panning the model?
-  int axes, small_axes;       // draw axes? 
-  int axes_size, small_axes_size; // axes size
-  int small_axes_pos[2];      // small axes position
+  int small_axes, small_axes_size, small_axes_pos[2]; // small axes
+  int axes, axes_auto_position, axes_tics[3]; // large axes
+  double axes_position[6];  
+  char axes_label[3][256], axes_format[3][256];
   int threads, threads_lock;  // threads?, lock (should be a mutex...) 
   int alpha;                  // enable alpha blending 
   double zoom_factor;         // mouse2 zoom coefficient
@@ -142,6 +143,9 @@ public :
   double arrow_rel_stem_radius;  // relative radius of arrow stem
   double arrow_rel_stem_length;  // relative length of arrow stem
 
+  double model[16], proj[16]; // the modelview and projection matrix as they were
+                              // at the time of the last InitPosition() call
+
   // geometry options 
   struct{
     int vis_type;
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index c11b3f7063920ad5f9c8a19825ad96b7dcf3bdd8..d8cdb5bfb495104867002e42b76a47ca9b2fabcc 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -40,6 +40,19 @@
 // STRINGS
 
 StringXString GeneralOptions_String[] = {
+  { F|O, "AxesFormatX" , opt_general_axes_format0 , "%.3g" , 
+    "Number format for X-axis (in standard C form)" },
+  { F|O, "AxesFormatY" , opt_general_axes_format1 , "%.3g" , 
+    "Number format for Y-axis (in standard C form)" },
+  { F|O, "AxesFormatZ" , opt_general_axes_format2 , "%.3g" , 
+    "Number format for Z-axis (in standard C form)" },
+  { F|O, "AxesLabelX" , opt_general_axes_label0 , "" , 
+    "X-axis label" },
+  { F|O, "AxesLabelY" , opt_general_axes_label1 , "" , 
+    "Y-axis label" },
+  { F|O, "AxesLabelZ" , opt_general_axes_label2 , "" , 
+    "Z-axis label" },
+
   { F|O, "DefaultFileName" , opt_general_default_filename , "untitled.geo" ,
     "Default project file name" },
   { F,   "Display" , opt_general_display , "" ,
@@ -410,9 +423,27 @@ StringXNumber GeneralOptions_Number[] = {
   { F|O, "ArrowStemRadius" , opt_general_arrow_stem_radius , 0.02 ,
     "Relative radius of arrow stem" },
   { F|O, "Axes" , opt_general_axes , 0. ,
-    "Display the axes linked to the model" },
-  { F|O, "AxesSize" , opt_general_axes_size , 100. ,
-    "Size (in pixels) of moving axes" },
+    "Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid)" },
+  { F|O, "AxesAutoPosition" , opt_general_axes_auto_position , 1. , 
+    "Position the axes automatically" }, 
+  { F|O, "AxesMaxX" , opt_general_axes_xmax , 1. , 
+    "Maximum X-axis coordinate" }, 
+  { F|O, "AxesMaxY" , opt_general_axes_ymax , 1. , 
+    "Maximum Y-axis coordinate" }, 
+  { F|O, "AxesMaxZ" , opt_general_axes_zmax , 1. , 
+    "Maximum Z-axis coordinate" }, 
+  { F|O, "AxesMinX" , opt_general_axes_xmin , 0. , 
+    "Minimum X-axis coordinate" }, 
+  { F|O, "AxesMinY" , opt_general_axes_ymin , 0. , 
+    "Minimum Y-axis coordinate" }, 
+  { F|O, "AxesMinZ" , opt_general_axes_zmin , 0. , 
+    "Minimum Z-axis coordinate" }, 
+  { F|O, "AxesTicsX" , opt_general_axes_tics0 , 5. ,
+    "Number of tics on the X-axis" },
+  { F|O, "AxesTicsY" , opt_general_axes_tics1 , 5. ,
+    "Number of tics on the Y-axis" },
+  { F|O, "AxesTicsZ" , opt_general_axes_tics2 , 5. ,
+    "Number of tics on the Z-axis" },
   { F,   "Clip0" , opt_general_clip0 , 0. ,
     "Enable clipping plane 0 (Geometry=2^0, Mesh=2^1, View[i]=2^(2+i))" },
   { F,   "Clip0A" , opt_general_clip0a , 1.0 ,
@@ -1020,10 +1051,30 @@ StringXNumber ViewOptions_Number[] = {
     "Relative length of arrow stem" },
   { F|O, "ArrowStemRadius" , opt_view_arrow_stem_radius , 0.02 ,
     "Relative radius of arrow stem" },
-  { F|O, "AutoPosition" , opt_view_auto_position2d , 1. , 
+  { F|O, "AutoPosition" , opt_view_auto_position , 1. , 
     "Position the scale or 2D graph automatically" }, 
-  { F|O, "AutoPosition3D" , opt_view_auto_position3d , 1. , 
-    "Position the 3D grid automatically" }, 
+  { F|O, "Axes" , opt_view_axes , 0 ,
+    "Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid)" },
+  { F|O, "AxesAutoPosition" , opt_view_axes_auto_position , 1. , 
+    "Position the axes automatically" }, 
+  { F|O, "AxesMaxX" , opt_view_axes_xmax , 1. , 
+    "Maximum X-axis coordinate" }, 
+  { F|O, "AxesMaxY" , opt_view_axes_ymax , 1. , 
+    "Maximum Y-axis coordinate" }, 
+  { F|O, "AxesMaxZ" , opt_view_axes_zmax , 1. , 
+    "Maximum Z-axis coordinate" }, 
+  { F|O, "AxesMinX" , opt_view_axes_xmin , 0. , 
+    "Minimum X-axis coordinate" }, 
+  { F|O, "AxesMinY" , opt_view_axes_ymin , 0. , 
+    "Minimum Y-axis coordinate" }, 
+  { F|O, "AxesMinZ" , opt_view_axes_zmin , 0. , 
+    "Minimum Z-axis coordinate" }, 
+  { F|O, "AxesTicsX" , opt_view_axes_tics0 , 5. ,
+    "Number of tics on the X-axis" },
+  { F|O, "AxesTicsY" , opt_view_axes_tics1 , 5. ,
+    "Number of tics on the Y-axis" },
+  { F|O, "AxesTicsZ" , opt_view_axes_tics2 , 5. ,
+    "Number of tics on the Z-axis" },
 
   { F|O, "Boundary" , opt_view_boundary , 0. ,
     "Draw the `N minus b'-dimensional boundary of the element (N=element dimension, b=option value)" },
@@ -1091,8 +1142,9 @@ StringXNumber ViewOptions_Number[] = {
     "Generalized raise amplification factor" },
   { F|O, "GeneralizedRaiseView" , opt_view_gen_raise_view , -1. ,
     "Index of the view used for generalized raise (-1=self)" },
-  { F|O, "Grid" , opt_view_grid , 0 ,
-    "Grid mode (0=none, 1=axes, 2=box, 3=full grid, 4=open grid)" },
+  // for backward compatibility:
+  { F|O, "Grid" , opt_view_axes , 0 ,
+    "Grid mode (this option is deprecated: use View.Axes instead)" },
 
   { F|O, "Height" , opt_view_size1 , 200. , 
     "Height (in pixels) of the scale or 2D graph" }, 
@@ -1128,12 +1180,6 @@ StringXNumber ViewOptions_Number[] = {
 
   { F|O, "NbIso" , opt_view_nb_iso , 15. ,
     "Number of intervals" },
-  { F|O, "NbTicsX" , opt_view_nb_tics0 , 5. ,
-    "Number of tics on the X-axis" },
-  { F|O, "NbTicsY" , opt_view_nb_tics1 , 5. ,
-    "Number of tics on the Y-axis" },
-  { F|O, "NbTicsZ" , opt_view_nb_tics2 , 5. ,
-    "Number of tics on the Z-axis" },
   { F,   "NbTimeStep" , opt_view_nb_timestep , 1. ,
     "Number of time steps in the view (do not change this!)" },
   { F|O, "Normals" , opt_view_normals , 0. ,
@@ -1150,18 +1196,6 @@ StringXNumber ViewOptions_Number[] = {
     "Display size of points (in pixels)" },
   { F|O, "PointType" , opt_view_point_type , 0. , 
     "Display points as solid color dots (0) or 3D spheres (1)" },
-  { F,   "PositionMaxX" , opt_view_position_xmax , 1. , 
-    "Maximum grid coordinate along the X-axis" }, 
-  { F,   "PositionMaxY" , opt_view_position_ymax , 1. , 
-    "Maximum grid coordinate along the Y-axis" }, 
-  { F,   "PositionMaxZ" , opt_view_position_zmax , 1. , 
-    "Maximum grid coordinate along the Z-axis" }, 
-  { F,   "PositionMinX" , opt_view_position_xmin , 0. , 
-    "Minimum grid coordinate along the X-axis" }, 
-  { F,   "PositionMinY" , opt_view_position_ymin , 0. , 
-    "Minimum grid coordinate along the Y-axis" }, 
-  { F,   "PositionMinZ" , opt_view_position_zmin , 0. , 
-    "Minimum grid coordinate along the Z-axis" }, 
   { F|O, "PositionX" , opt_view_position0 , 100. , 
     "Horizontal position (in pixels) of the upper left corner of the scale or 2D graph" }, 
   { F|O, "PositionY" , opt_view_position1 , 50. , 
@@ -1289,7 +1323,7 @@ StringXColor GeneralOptions_Color[] = {
     PACK_COLOR(0,   0,   0,   255),
     "Text color" },
   { F|O, "Axes" , opt_general_color_axes ,
-    PACK_COLOR(255, 255, 0,   255),
+    PACK_COLOR(255, 255, 255,   255),
     PACK_COLOR(128, 128, 128, 255),
     PACK_COLOR(0,   0,   0,   255),
     "Axes color" },
diff --git a/Common/Options.cpp b/Common/Options.cpp
index b9a56d5aa1484f94dd07a74b1d2c827719bcfdac..18a7e30f90727ffc41c3d52b4c57512c8dff3b82 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.230 2005-03-12 00:59:40 geuzaine Exp $
+// $Id: Options.cpp,v 1.231 2005-03-12 07:52:54 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -797,6 +797,72 @@ int Get_ColorForString(StringX4Int SX4I[], int alpha,
     v = *vv;                                                            \
   }
 
+char *opt_general_axes_label0(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    strcpy(CTX.axes_label[0], val);
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_input[6]->value(CTX.axes_label[0]);
+#endif
+  return CTX.axes_label[0];
+}
+
+char *opt_general_axes_label1(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    strcpy(CTX.axes_label[1], val);
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_input[7]->value(CTX.axes_label[1]);
+#endif
+  return CTX.axes_label[1];
+}
+
+char *opt_general_axes_label2(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    strcpy(CTX.axes_label[2], val);
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_input[8]->value(CTX.axes_label[2]);
+#endif
+  return CTX.axes_label[2];
+}
+
+char *opt_general_axes_format0(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    strcpy(CTX.axes_format[0], val);
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_input[3]->value(CTX.axes_format[0]);
+#endif
+  return CTX.axes_format[0];
+}
+
+char *opt_general_axes_format1(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    strcpy(CTX.axes_format[1], val);
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_input[4]->value(CTX.axes_format[1]);
+#endif
+  return CTX.axes_format[1];
+}
+
+char *opt_general_axes_format2(OPT_ARGS_STR)
+{
+  if(action & GMSH_SET)
+    strcpy(CTX.axes_format[2], val);
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_input[5]->value(CTX.axes_format[2]);
+#endif
+  return CTX.axes_format[2];
+}
+
 char *opt_general_display(OPT_ARGS_STR)
 {
   if(action & GMSH_SET)
@@ -2571,20 +2637,126 @@ double opt_general_draw_bounding_box(OPT_ARGS_NUM)
 
 double opt_general_axes(OPT_ARGS_NUM)
 {
-  if(action & GMSH_SET)
+  if(action & GMSH_SET){
     CTX.axes = (int)val;
+    if(CTX.axes < 0 || CTX.axes > 4)
+      CTX.axes = 0;
+  }
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI))
-    WID->gen_butt[0]->value(CTX.axes);
+    WID->gen_choice[4]->value(CTX.axes);
 #endif
   return CTX.axes;
 }
 
-double opt_general_axes_size(OPT_ARGS_NUM)
+double opt_general_axes_auto_position(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX.axes_size = (int)val;
-  return CTX.axes_size;
+    CTX.axes_auto_position = (int)val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_butt[0]->value(CTX.axes_auto_position);
+#endif
+  return CTX.axes_auto_position;
+}
+
+double opt_general_axes_tics0(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_tics[0] = (int)val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[17]->value(CTX.axes_tics[0]);
+#endif
+  return CTX.axes_tics[0];
+}
+
+double opt_general_axes_tics1(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_tics[1] = (int)val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[18]->value(CTX.axes_tics[1]);
+#endif
+  return CTX.axes_tics[1];
+}
+
+double opt_general_axes_tics2(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_tics[2] = (int)val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[19]->value(CTX.axes_tics[2]);
+#endif
+  return CTX.axes_tics[2];
+}
+
+double opt_general_axes_xmin(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_position[0] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[20]->value(CTX.axes_position[0]);
+#endif
+  return CTX.axes_position[0];
+}
+
+double opt_general_axes_xmax(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_position[1] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[23]->value(CTX.axes_position[1]);
+#endif
+  return CTX.axes_position[1];
+}
+
+double opt_general_axes_ymin(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_position[2] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[21]->value(CTX.axes_position[2]);
+#endif
+  return CTX.axes_position[2];
+}
+
+double opt_general_axes_ymax(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_position[3] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[24]->value(CTX.axes_position[3]);
+#endif
+  return CTX.axes_position[3];
+}
+
+double opt_general_axes_zmin(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_position[4] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[22]->value(CTX.axes_position[4]);
+#endif
+  return CTX.axes_position[4];
+}
+
+double opt_general_axes_zmax(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.axes_position[5] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[25]->value(CTX.axes_position[5]);
+#endif
+  return CTX.axes_position[5];
 }
 
 double opt_general_small_axes(OPT_ARGS_NUM)
@@ -2602,6 +2774,10 @@ double opt_general_small_axes_position0(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
     CTX.small_axes_pos[0] = (int)val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[26]->value(CTX.small_axes_pos[0]);
+#endif
   return CTX.small_axes_pos[0];
 }
 
@@ -2609,6 +2785,10 @@ double opt_general_small_axes_position1(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
     CTX.small_axes_pos[1] = (int)val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[27]->value(CTX.small_axes_pos[1]);
+#endif
   return CTX.small_axes_pos[1];
 }
 
@@ -5132,226 +5312,226 @@ double opt_view_type(OPT_ARGS_NUM)
   return v->Type;
 }
 
-double opt_view_auto_position2d(OPT_ARGS_NUM)
+double opt_view_auto_position(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AutoPosition2D = (int)val;
+    v->AutoPosition = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_butt[7]->value(v->AutoPosition2D);
+    WID->view_butt[7]->value(v->AutoPosition);
   }
 #endif
-  return v->AutoPosition2D;
+  return v->AutoPosition;
 }
 
 double opt_view_position0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position2D[0] = (int)val;
+    v->Position[0] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[20]->value(v->Position2D[0]);
+    WID->view_value[20]->value(v->Position[0]);
 #endif
-  return v->Position2D[0];
+  return v->Position[0];
 }
 
 double opt_view_position1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position2D[1] = (int)val;
+    v->Position[1] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[21]->value(v->Position2D[1]);
+    WID->view_value[21]->value(v->Position[1]);
 #endif
-  return v->Position2D[1];
+  return v->Position[1];
 }
 
 double opt_view_size0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Size2D[0] = (int)val;
+    v->Size[0] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[22]->value(v->Size2D[0]);
+    WID->view_value[22]->value(v->Size[0]);
 #endif
-  return v->Size2D[0];
+  return v->Size[0];
 }
 
 double opt_view_size1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Size2D[1] = (int)val;
+    v->Size[1] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num))
-    WID->view_value[23]->value(v->Size2D[1]);
+    WID->view_value[23]->value(v->Size[1]);
 #endif
-  return v->Size2D[1];
+  return v->Size[1];
 }
 
-double opt_view_auto_position3d(OPT_ARGS_NUM)
+double opt_view_axes(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->AutoPosition3D = (int)val;
+    v->Axes = (int)val;
+    if(v->Axes < 0 || v->Axes > 4)
+      v->Axes = 0;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_butt[25]->value(v->AutoPosition3D);
+    WID->view_choice[8]->value(v->Axes);
   }
 #endif
-  return v->AutoPosition3D;
+  return v->Axes;
 }
 
-double opt_view_position_xmin(OPT_ARGS_NUM)
+double opt_view_axes_auto_position(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position3D[0] = val;
+    v->AxesAutoPosition = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[13]->value(v->Position3D[0]);
+    WID->view_butt[25]->value(v->AxesAutoPosition);
   }
 #endif
-  return v->Position3D[0];
+  return v->AxesAutoPosition;
 }
 
-double opt_view_position_xmax(OPT_ARGS_NUM)
+double opt_view_axes_xmin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position3D[1] = val;
+    v->AxesPosition[0] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[16]->value(v->Position3D[1]);
+    WID->view_value[13]->value(v->AxesPosition[0]);
   }
 #endif
-  return v->Position3D[1];
+  return v->AxesPosition[0];
 }
 
-double opt_view_position_ymin(OPT_ARGS_NUM)
+double opt_view_axes_xmax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position3D[2] = val;
+    v->AxesPosition[1] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[14]->value(v->Position3D[2]);
+    WID->view_value[16]->value(v->AxesPosition[1]);
   }
 #endif
-  return v->Position3D[2];
+  return v->AxesPosition[1];
 }
 
-double opt_view_position_ymax(OPT_ARGS_NUM)
+double opt_view_axes_ymin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position3D[3] = val;
+    v->AxesPosition[2] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[17]->value(v->Position3D[3]);
+    WID->view_value[14]->value(v->AxesPosition[2]);
   }
 #endif
-  return v->Position3D[3];
+  return v->AxesPosition[2];
 }
 
-double opt_view_position_zmin(OPT_ARGS_NUM)
+double opt_view_axes_ymax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position3D[4] = val;
+    v->AxesPosition[3] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[15]->value(v->Position3D[4]);
+    WID->view_value[17]->value(v->AxesPosition[3]);
   }
 #endif
-  return v->Position3D[4];
+  return v->AxesPosition[3];
 }
 
-double opt_view_position_zmax(OPT_ARGS_NUM)
+double opt_view_axes_zmin(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Position3D[5] = val;
+    v->AxesPosition[4] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[18]->value(v->Position3D[5]);
+    WID->view_value[15]->value(v->AxesPosition[4]);
   }
 #endif
-  return v->Position3D[5];
+  return v->AxesPosition[4];
 }
 
-double opt_view_grid(OPT_ARGS_NUM)
+double opt_view_axes_zmax(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->Grid = (int)val;
-    if(v->Grid < 0 || v->Grid > 4)
-      v->Grid = 0;
+    v->AxesPosition[5] = val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_choice[8]->value(v->Grid);
+    WID->view_value[18]->value(v->AxesPosition[5]);
   }
 #endif
-  return v->Grid;
+  return v->AxesPosition[5];
 }
 
-double opt_view_nb_tics0(OPT_ARGS_NUM)
+double opt_view_axes_tics0(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->NbTics[0] = (int)val;
+    v->AxesTics[0] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[3]->value(v->NbTics[0]);
+    WID->view_value[3]->value(v->AxesTics[0]);
   }
 #endif
-  return v->NbTics[0];
+  return v->AxesTics[0];
 }
 
-double opt_view_nb_tics1(OPT_ARGS_NUM)
+double opt_view_axes_tics1(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->NbTics[1] = (int)val;
+    v->AxesTics[1] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[4]->value(v->NbTics[1]);
+    WID->view_value[4]->value(v->AxesTics[1]);
   }
 #endif
-  return v->NbTics[1];
+  return v->AxesTics[1];
 }
 
-double opt_view_nb_tics2(OPT_ARGS_NUM)
+double opt_view_axes_tics2(OPT_ARGS_NUM)
 {
   GET_VIEW(0.);
   if(action & GMSH_SET) {
-    v->NbTics[2] = (int)val;
+    v->AxesTics[2] = (int)val;
   }
 #if defined(HAVE_FLTK)
   if(_gui_action_valid(action, num)) {
-    WID->view_value[5]->value(v->NbTics[2]);
+    WID->view_value[5]->value(v->AxesTics[2]);
   }
 #endif
-  return v->NbTics[2];
+  return v->AxesTics[2];
 }
 
 double opt_view_nb_iso(OPT_ARGS_NUM)
diff --git a/Common/Options.h b/Common/Options.h
index 13607febdc4712bd333ea08f39603f0deca98613..a8d16faab849045b338e65a31049cbbf499f9d45 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -36,6 +36,12 @@
 
 // STRINGS
 
+char * opt_general_axes_label0(OPT_ARGS_STR);
+char * opt_general_axes_label1(OPT_ARGS_STR);
+char * opt_general_axes_label2(OPT_ARGS_STR);
+char * opt_general_axes_format0(OPT_ARGS_STR);
+char * opt_general_axes_format1(OPT_ARGS_STR);
+char * opt_general_axes_format2(OPT_ARGS_STR);
 char * opt_general_display(OPT_ARGS_STR);
 char * opt_general_default_filename(OPT_ARGS_STR);
 char * opt_general_tmp_filename(OPT_ARGS_STR);
@@ -274,7 +280,16 @@ double opt_general_orthographic(OPT_ARGS_NUM);
 double opt_general_draw_bounding_box(OPT_ARGS_NUM);
 double opt_general_fast_redraw(OPT_ARGS_NUM);
 double opt_general_axes(OPT_ARGS_NUM);
-double opt_general_axes_size(OPT_ARGS_NUM);
+double opt_general_axes_auto_position(OPT_ARGS_NUM);
+double opt_general_axes_xmin(OPT_ARGS_NUM);
+double opt_general_axes_xmax(OPT_ARGS_NUM);
+double opt_general_axes_ymin(OPT_ARGS_NUM);
+double opt_general_axes_ymax(OPT_ARGS_NUM);
+double opt_general_axes_zmin(OPT_ARGS_NUM);
+double opt_general_axes_zmax(OPT_ARGS_NUM);
+double opt_general_axes_tics0(OPT_ARGS_NUM);
+double opt_general_axes_tics1(OPT_ARGS_NUM);
+double opt_general_axes_tics2(OPT_ARGS_NUM);
 double opt_general_small_axes(OPT_ARGS_NUM);
 double opt_general_small_axes_position0(OPT_ARGS_NUM);
 double opt_general_small_axes_position1(OPT_ARGS_NUM);
@@ -524,23 +539,23 @@ double opt_view_gen_raise_view(OPT_ARGS_NUM);
 double opt_view_gen_raise_factor(OPT_ARGS_NUM);
 double opt_view_use_gen_raise(OPT_ARGS_NUM);
 double opt_view_type(OPT_ARGS_NUM);
-double opt_view_grid(OPT_ARGS_NUM);
-double opt_view_position_xmin(OPT_ARGS_NUM);
-double opt_view_position_ymin(OPT_ARGS_NUM);
-double opt_view_position_zmin(OPT_ARGS_NUM);
-double opt_view_position_xmax(OPT_ARGS_NUM);
-double opt_view_position_ymax(OPT_ARGS_NUM);
-double opt_view_position_zmax(OPT_ARGS_NUM);
+double opt_view_axes(OPT_ARGS_NUM);
+double opt_view_axes_auto_position(OPT_ARGS_NUM);
+double opt_view_axes_tics0(OPT_ARGS_NUM);
+double opt_view_axes_tics1(OPT_ARGS_NUM);
+double opt_view_axes_tics2(OPT_ARGS_NUM);
+double opt_view_axes_xmin(OPT_ARGS_NUM);
+double opt_view_axes_ymin(OPT_ARGS_NUM);
+double opt_view_axes_zmin(OPT_ARGS_NUM);
+double opt_view_axes_xmax(OPT_ARGS_NUM);
+double opt_view_axes_ymax(OPT_ARGS_NUM);
+double opt_view_axes_zmax(OPT_ARGS_NUM);
 double opt_view_position0(OPT_ARGS_NUM);
 double opt_view_position1(OPT_ARGS_NUM);
-double opt_view_auto_position2d(OPT_ARGS_NUM);
-double opt_view_auto_position3d(OPT_ARGS_NUM);
+double opt_view_auto_position(OPT_ARGS_NUM);
 double opt_view_size0(OPT_ARGS_NUM);
 double opt_view_size1(OPT_ARGS_NUM);
 double opt_view_nb_iso(OPT_ARGS_NUM);
-double opt_view_nb_tics0(OPT_ARGS_NUM);
-double opt_view_nb_tics1(OPT_ARGS_NUM);
-double opt_view_nb_tics2(OPT_ARGS_NUM);
 double opt_view_boundary(OPT_ARGS_NUM);
 double opt_view_light(OPT_ARGS_NUM);
 double opt_view_light_two_side(OPT_ARGS_NUM);
diff --git a/Common/Views.cpp b/Common/Views.cpp
index 2ed7ecef5cf84361ef79085f732a2b1d075a9604..d67ea2f07647e90f02ea96e8560ebcab629a1d2b 100644
--- a/Common/Views.cpp
+++ b/Common/Views.cpp
@@ -1,4 +1,4 @@
-// $Id: Views.cpp,v 1.166 2005-03-12 00:59:40 geuzaine Exp $
+// $Id: Views.cpp,v 1.167 2005-03-12 07:52:54 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -611,13 +611,14 @@ void FreeView(Post_View * v)
 void CopyViewOptions(Post_View * src, Post_View * dest)
 {
   dest->Type = src->Type;
-  dest->AutoPosition2D = src->AutoPosition2D;
-  dest->AutoPosition3D = src->AutoPosition3D;
-  dest->Position2D[0] = src->Position2D[0];
-  dest->Position2D[1] = src->Position2D[1];
-  dest->Size2D[0] = src->Size2D[0];
-  dest->Size2D[1] = src->Size2D[1];
-  for(int i = 0; i < 6; i++) dest->Position3D[i] = src->Position3D[i];
+  dest->AutoPosition = src->AutoPosition;
+  dest->AxesAutoPosition = src->AxesAutoPosition;
+  dest->Position[0] = src->Position[0];
+  dest->Position[1] = src->Position[1];
+  dest->Size[0] = src->Size[0];
+  dest->Size[1] = src->Size[1];
+  for(int i = 0; i < 6; i++) dest->AxesPosition[i] = src->AxesPosition[i];
+  for(int i = 0; i < 3; i++) dest->AxesTics[i] = src->AxesTics[i];
   strcpy(dest->Format, src->Format);
   for(int i = 0; i < 3; i++) strcpy(dest->AxesFormat[i], src->AxesFormat[i]);
   for(int i = 0; i < 3; i++) strcpy(dest->AxesLabel[i], src->AxesLabel[i]);
@@ -645,7 +646,6 @@ void CopyViewOptions(Post_View * src, Post_View * dest)
   dest->IntervalsType = src->IntervalsType;
   dest->SaturateValues = src->SaturateValues;
   dest->Boundary = src->Boundary;
-  for(int i = 0; i < 3; i++) dest->NbTics[i] = src->NbTics[i];
   dest->NbIso = src->NbIso;
   dest->Light = src->Light;
   dest->LightTwoSide = src->LightTwoSide;
@@ -676,7 +676,7 @@ void CopyViewOptions(Post_View * src, Post_View * dest)
   dest->LineWidth = src->LineWidth;
   dest->PointType = src->PointType;
   dest->LineType = src->LineType;
-  dest->Grid = src->Grid;
+  dest->Axes = src->Axes;
   dest->ExternalViewIndex = src->ExternalViewIndex;
   dest->ViewIndexForGenRaise = src->ViewIndexForGenRaise;
   dest->UseGenRaise = src->UseGenRaise;
@@ -779,7 +779,7 @@ Post_View *Create2DGraph(char *xname, char *yname,
   sprintf(filename, "%s.pos", yname);
   EndView(v, 1, filename, yname);
   v->Type = DRAW_POST_2D_SPACE;
-  v->Grid = 2;
+  v->Axes = 2;
   strcpy(v->AxesLabel[0], xname);
   return v;
 }
diff --git a/Common/Views.h b/Common/Views.h
index 6a85673b5cdc909010d9a407d7fb54c03b9135f6..b15c23c6e07bf674089c1d936ce012ea370bef7a 100644
--- a/Common/Views.h
+++ b/Common/Views.h
@@ -75,14 +75,16 @@ class Post_View{
 
   // options
   int Type;
-  int Position2D[2], Size2D[2], AutoPosition2D, AutoPosition3D;
-  double Position3D[6];
-  char   Format[256], AxesFormat[3][256], AxesLabel[3][256];
+  int Position[2], Size[2], AutoPosition;
+  char Format[256];
+  int Axes, AxesAutoPosition, AxesTics[3];
+  char AxesFormat[3][256], AxesLabel[3][256];
+  double AxesPosition[6];
   double CustomMin, CustomMax;
   double Offset[3], Raise[3], Transform[3][3], DisplacementFactor, Explode;
   double ArrowSize, ArrowRelHeadRadius, ArrowRelStemRadius, ArrowRelStemLength;
   double Normals, Tangents;
-  int Visible, IntervalsType, NbIso, NbTics[3], ArrowSizeProportional;
+  int Visible, IntervalsType, NbIso, ArrowSizeProportional;
   int Light, LightTwoSide, SmoothNormals;
   double AngleSmoothNormals;
   int SaturateValues, FakeTransparency;
@@ -94,7 +96,7 @@ class Post_View{
   int DrawPoints, DrawLines, DrawTriangles, DrawQuadrangles;
   int DrawTetrahedra, DrawHexahedra, DrawPrisms, DrawPyramids;
   int DrawScalars, DrawVectors, DrawTensors;
-  int Boundary, Grid, PointType, LineType;
+  int Boundary, PointType, LineType;
   double PointSize, LineWidth;
   GmshColorTable CT;
   int ExternalViewIndex, ViewIndexForGenRaise;
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 96b627c8325984c9184d40ba6a289281c28e61f6..0690c2894601a63b32ab60c5c287e62e5df49b98 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.344 2005-03-12 01:41:10 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.345 2005-03-12 07:52:54 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -696,7 +696,7 @@ void general_options_rotation_center_select_cb(CALLBACK_ARGS)
 
 void general_options_ok_cb(CALLBACK_ARGS)
 {
-  opt_general_axes(0, GMSH_SET, WID->gen_butt[0]->value());
+  opt_general_axes_auto_position(0, GMSH_SET, WID->gen_butt[0]->value());
   opt_general_small_axes(0, GMSH_SET, WID->gen_butt[1]->value());
   opt_general_fast_redraw(0, GMSH_SET, WID->gen_butt[2]->value());
   if(opt_general_double_buffer(0, GMSH_GET, 0) != WID->gen_butt[3]->value())
@@ -731,10 +731,27 @@ void general_options_ok_cb(CALLBACK_ARGS)
   opt_general_clip_factor(0, GMSH_SET, WID->gen_value[14]->value());
   opt_general_polygon_offset_factor(0, GMSH_SET, WID->gen_value[15]->value());
   opt_general_polygon_offset_units(0, GMSH_SET, WID->gen_value[16]->value());
+  opt_general_axes_tics0(0, GMSH_SET, WID->gen_value[17]->value());
+  opt_general_axes_tics1(0, GMSH_SET, WID->gen_value[18]->value());
+  opt_general_axes_tics2(0, GMSH_SET, WID->gen_value[19]->value());
+  opt_general_axes_xmin(0, GMSH_SET, WID->gen_value[20]->value());
+  opt_general_axes_ymin(0, GMSH_SET, WID->gen_value[21]->value());
+  opt_general_axes_zmin(0, GMSH_SET, WID->gen_value[22]->value());
+  opt_general_axes_xmax(0, GMSH_SET, WID->gen_value[23]->value());
+  opt_general_axes_ymax(0, GMSH_SET, WID->gen_value[24]->value());
+  opt_general_axes_zmax(0, GMSH_SET, WID->gen_value[25]->value());
+  opt_general_small_axes_position0(0, GMSH_SET, WID->gen_value[26]->value());
+  opt_general_small_axes_position1(0, GMSH_SET, WID->gen_value[27]->value());
 
   opt_general_default_filename(0, GMSH_SET, (char *)WID->gen_input[0]->value());
   opt_general_editor(0, GMSH_SET, (char *)WID->gen_input[1]->value());
   opt_general_web_browser(0, GMSH_SET, (char *)WID->gen_input[2]->value());
+  opt_general_axes_format0(0, GMSH_SET, (char *)WID->gen_input[3]->value());
+  opt_general_axes_format1(0, GMSH_SET, (char *)WID->gen_input[4]->value());
+  opt_general_axes_format2(0, GMSH_SET, (char *)WID->gen_input[5]->value());
+  opt_general_axes_label0(0, GMSH_SET, (char *)WID->gen_input[6]->value());
+  opt_general_axes_label1(0, GMSH_SET, (char *)WID->gen_input[7]->value());
+  opt_general_axes_label2(0, GMSH_SET, (char *)WID->gen_input[8]->value());
 
   int val;
   switch (WID->gen_choice[0]->value()) {
@@ -754,6 +771,7 @@ void general_options_ok_cb(CALLBACK_ARGS)
   opt_general_vector_type(0, GMSH_SET, val);
   opt_general_graphics_font(0, GMSH_SET, (char *)WID->gen_choice[1]->text());
   opt_general_orthographic(0, GMSH_SET | GMSH_GUI, !WID->gen_choice[2]->value());
+  opt_general_axes(0, GMSH_SET, WID->gen_choice[4]->value());
 }
 
 void general_arrow_param_cb(CALLBACK_ARGS)
@@ -1323,12 +1341,12 @@ void help_short_cb(CALLBACK_ARGS)
   Msg(DIRECT, "  Shift+Ctrl+s  Save mesh in default format");
   Msg(DIRECT, "  Shift+Ctrl+v  Show visibility window");
   Msg(DIRECT, " ");
-  Msg(DIRECT, "  Alt+a         Hide/show small axes"); 
+  Msg(DIRECT, "  Alt+a         Loop through axes modes"); 
   Msg(DIRECT, "  Alt+b         Hide/show bounding boxes");
   Msg(DIRECT, "  Alt+c         Loop through predefined color schemes");
   Msg(DIRECT, "  Alt+d         Change surface mesh display mode (solid/wireframe)");
   Msg(DIRECT, "  Alt+f         Change redraw mode (fast/full)"); 
-  Msg(DIRECT, "  Alt+g         Loop through grid modes for all post-processing views"); 
+  Msg(DIRECT, "  Alt+g         Loop through axes modes for visible post-processing views"); 
   Msg(DIRECT, "  Alt+h         Hide/show all post-processing views"); 
   Msg(DIRECT, "  Alt+i         Hide/show all post-processing view scales");
   Msg(DIRECT, "  Alt+l         Hide/show geometry lines");
@@ -1337,14 +1355,14 @@ void help_short_cb(CALLBACK_ARGS)
   Msg(DIRECT, "  Alt+o         Change projection mode (orthographic/perspective)");
   Msg(DIRECT, "  Alt+p         Hide/show geometry points");
   Msg(DIRECT, "  Alt+s         Hide/show geometry surfaces");
-  Msg(DIRECT, "  Alt+t         Loop through interval modes for all post-processing views"); 
+  Msg(DIRECT, "  Alt+t         Loop through interval modes for visible post-processing views"); 
   Msg(DIRECT, "  Alt+v         Hide/show geometry volumes");
   Msg(DIRECT, "  Alt+w         Enable/disable all lighting");
   Msg(DIRECT, "  Alt+x         Set X view"); 
   Msg(DIRECT, "  Alt+y         Set Y view"); 
   Msg(DIRECT, "  Alt+z         Set Z view"); 
   Msg(DIRECT, " ");
-  Msg(DIRECT, "  Alt+Shift+a   Hide/show moving axes"); 
+  Msg(DIRECT, "  Alt+Shift+a   Hide/show small axes"); 
   Msg(DIRECT, "  Alt+Shift+l   Hide/show surface mesh edges");
   Msg(DIRECT, "  Alt+Shift+p   Hide/show mesh points");
   Msg(DIRECT, "  Alt+Shift+s   Hide/show mesh surfaces");
@@ -3304,7 +3322,7 @@ void view_options_ok_cb(CALLBACK_ARGS)
   double arrow_location = opt_view_arrow_location(current, GMSH_GET, 0);
   //double tensor_type = opt_view_tensor_type(current, GMSH_GET, 0);
   double range_type = opt_view_range_type(current, GMSH_GET, 0);
-  double grid = opt_view_grid(current, GMSH_GET, 0);
+  double axes = opt_view_axes(current, GMSH_GET, 0);
   double boundary = opt_view_boundary(current, GMSH_GET, 0);
   double external_view = opt_view_external_view(current, GMSH_GET, 0);
   double gen_raise_view = opt_view_gen_raise_view(current, GMSH_GET, 0);
@@ -3315,8 +3333,8 @@ void view_options_ok_cb(CALLBACK_ARGS)
   double target_error = opt_view_target_error(current, GMSH_GET, 0);
   double show_element = opt_view_show_element(current, GMSH_GET, 0);
   double show_scale = opt_view_show_scale(current, GMSH_GET, 0);
-  double auto_position2d = opt_view_auto_position2d(current, GMSH_GET, 0);
-  double auto_position3d = opt_view_auto_position3d(current, GMSH_GET, 0);
+  double auto_position = opt_view_auto_position(current, GMSH_GET, 0);
+  double axes_auto_position = opt_view_axes_auto_position(current, GMSH_GET, 0);
   double show_time = opt_view_show_time(current, GMSH_GET, 0);
   double draw_strings = opt_view_draw_strings(current, GMSH_GET, 0);
   double light = opt_view_light(current, GMSH_GET, 0);
@@ -3368,15 +3386,15 @@ void view_options_ok_cb(CALLBACK_ARGS)
   double position1 = opt_view_position1(current, GMSH_GET, 0);
   double size0 = opt_view_size0(current, GMSH_GET, 0);
   double size1 = opt_view_size1(current, GMSH_GET, 0);
-  double nb_tics0 = opt_view_nb_tics0(current, GMSH_GET, 0);
-  double nb_tics1 = opt_view_nb_tics1(current, GMSH_GET, 0);
-  double nb_tics2 = opt_view_nb_tics2(current, GMSH_GET, 0);
-  double position_xmin = opt_view_position_xmin(current, GMSH_GET, 0);
-  double position_ymin = opt_view_position_ymin(current, GMSH_GET, 0);
-  double position_zmin = opt_view_position_zmin(current, GMSH_GET, 0);
-  double position_xmax = opt_view_position_xmax(current, GMSH_GET, 0);
-  double position_ymax = opt_view_position_ymax(current, GMSH_GET, 0);
-  double position_zmax = opt_view_position_zmax(current, GMSH_GET, 0);
+  double axes_tics0 = opt_view_axes_tics0(current, GMSH_GET, 0);
+  double axes_tics1 = opt_view_axes_tics1(current, GMSH_GET, 0);
+  double axes_tics2 = opt_view_axes_tics2(current, GMSH_GET, 0);
+  double axes_xmin = opt_view_axes_xmin(current, GMSH_GET, 0);
+  double axes_ymin = opt_view_axes_ymin(current, GMSH_GET, 0);
+  double axes_zmin = opt_view_axes_zmin(current, GMSH_GET, 0);
+  double axes_xmax = opt_view_axes_xmax(current, GMSH_GET, 0);
+  double axes_ymax = opt_view_axes_ymax(current, GMSH_GET, 0);
+  double axes_zmax = opt_view_axes_zmax(current, GMSH_GET, 0);
   double gen_raise_factor = opt_view_gen_raise_factor(current, GMSH_GET, 0);
 
   char name[256];
@@ -3511,8 +3529,8 @@ void view_options_ok_cb(CALLBACK_ARGS)
         opt_view_range_type(i, GMSH_SET, val);
 
       val = WID->view_choice[8]->value();
-      if(force || (val != grid))
-        opt_view_grid(i, GMSH_SET, val);
+      if(force || (val != axes))
+        opt_view_axes(i, GMSH_SET, val);
 
       val = WID->view_choice[9]->value();
       if(force || (val != boundary))
@@ -3550,12 +3568,12 @@ void view_options_ok_cb(CALLBACK_ARGS)
         opt_view_show_scale(i, GMSH_SET, val);
 
       val = WID->view_butt[7]->value();
-      if(force || (val != auto_position2d))
-        opt_view_auto_position2d(i, GMSH_SET, val);
+      if(force || (val != auto_position))
+        opt_view_auto_position(i, GMSH_SET, val);
 
       val = WID->view_butt[25]->value();
-      if(force || (val != auto_position3d))
-        opt_view_auto_position3d(i, GMSH_SET, val);
+      if(force || (val != axes_auto_position))
+        opt_view_axes_auto_position(i, GMSH_SET, val);
 
       val = WID->view_butt[8]->value();
       if(force || (val != show_time))
@@ -3764,44 +3782,44 @@ void view_options_ok_cb(CALLBACK_ARGS)
         opt_view_size1(i, GMSH_SET, val);
 
       val = WID->view_value[13]->value();
-      if(force || (val != position_xmin))
-        opt_view_position_xmin(i, GMSH_SET, val);
+      if(force || (val != axes_xmin))
+        opt_view_axes_xmin(i, GMSH_SET, val);
 
       val = WID->view_value[14]->value();
-      if(force || (val != position_ymin))
-        opt_view_position_ymin(i, GMSH_SET, val);
+      if(force || (val != axes_ymin))
+        opt_view_axes_ymin(i, GMSH_SET, val);
 
       val = WID->view_value[15]->value();
-      if(force || (val != position_zmin))
-        opt_view_position_zmin(i, GMSH_SET, val);
+      if(force || (val != axes_zmin))
+        opt_view_axes_zmin(i, GMSH_SET, val);
 
       val = WID->view_value[16]->value();
-      if(force || (val != position_xmax))
-        opt_view_position_xmax(i, GMSH_SET, val);
+      if(force || (val != axes_xmax))
+        opt_view_axes_xmax(i, GMSH_SET, val);
 
       val = WID->view_value[17]->value();
-      if(force || (val != position_ymax))
-        opt_view_position_ymax(i, GMSH_SET, val);
+      if(force || (val != axes_ymax))
+        opt_view_axes_ymax(i, GMSH_SET, val);
 
       val = WID->view_value[18]->value();
-      if(force || (val != position_zmax))
-        opt_view_position_zmax(i, GMSH_SET, val);
+      if(force || (val != axes_zmax))
+        opt_view_axes_zmax(i, GMSH_SET, val);
 
       val = WID->view_value[2]->value();
       if(force || (val != gen_raise_factor))
         opt_view_gen_raise_factor(i, GMSH_SET, val);
 
       val = WID->view_value[3]->value();
-      if(force || (val != nb_tics0))
-        opt_view_nb_tics0(i, GMSH_SET, val);
+      if(force || (val != axes_tics0))
+        opt_view_axes_tics0(i, GMSH_SET, val);
 
       val = WID->view_value[4]->value();
-      if(force || (val != nb_tics1))
-        opt_view_nb_tics1(i, GMSH_SET, val);
+      if(force || (val != axes_tics1))
+        opt_view_axes_tics1(i, GMSH_SET, val);
 
       val = WID->view_value[5]->value();
-      if(force || (val != nb_tics2))
-        opt_view_nb_tics2(i, GMSH_SET, val);
+      if(force || (val != axes_tics2))
+        opt_view_axes_tics2(i, GMSH_SET, val);
 
       // view_inputs
 
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 5bfadce50adfa9dd01248125cafcec5d4114e24d..dd0fea51d1bba8821398254d04c6f04088e7a716 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.424 2005-03-12 00:59:41 geuzaine Exp $
+// $Id: GUI.cpp,v 1.425 2005-03-12 07:52:55 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -390,6 +390,15 @@ static Fl_Menu_Item menu_line_display_with_plugin[] = {
   {0}
 };
 
+static Fl_Menu_Item menu_axes_mode[] = {
+  {"None", 0, 0, 0},
+  {"Simple axes", 0, 0, 0},
+  {"Box", 0, 0, 0},
+  {"Full grid", 0, 0, 0},
+  {"Open grid", 0, 0, 0},
+  {0}
+};
+
 #define NUM_FONTS 14
 
 Fl_Menu_Item menu_font_names[] = {
@@ -646,13 +655,13 @@ int GUI::global_shortcuts(int event)
     status_xyz1p_cb(0, (void *)2);
     return 1;
   }
-  else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 'a')) {
-    opt_general_axes(0, GMSH_SET | GMSH_GUI,
-                     !opt_general_axes(0, GMSH_GET, 0));
+  else if(Fl::test_shortcut(FL_ALT + 'a')) {
+    opt_general_axes(0, GMSH_SET | GMSH_GUI, 
+		     opt_general_axes(0, GMSH_GET, 0) + 1);
     redraw_opengl();
     return 1;
   }
-  else if(Fl::test_shortcut(FL_ALT + 'a')) {
+  else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 'a')) {
     opt_general_small_axes(0, GMSH_SET | GMSH_GUI,
                            !opt_general_small_axes(0, GMSH_GET, 0));
     redraw_opengl();
@@ -739,7 +748,7 @@ int GUI::global_shortcuts(int event)
   else if(Fl::test_shortcut(FL_ALT + 'g')) {
     for(i = 0; i < List_Nbr(CTX.post.list); i++) {
       if(opt_view_visible(i, GMSH_GET, 0))
-        opt_view_grid(i, GMSH_SET | GMSH_GUI, opt_view_grid(i, GMSH_GET, 0)+1);
+        opt_view_axes(i, GMSH_SET | GMSH_GUI, opt_view_axes(i, GMSH_GET, 0)+1);
     }
     redraw_opengl();
     return 1;
@@ -1666,56 +1675,109 @@ void GUI::create_option_window()
       gen_butt[13]->down_box(GMSH_TOGGLE_BOX);
       gen_butt[13]->selection_color(GMSH_TOGGLE_COLOR);
 
-      gen_butt[0] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 2 * BH, BW, BH, "Show moving axes");
-      gen_butt[0]->tooltip("(Alt+Shift+a)");
-      gen_butt[0]->type(FL_TOGGLE_BUTTON);
-      gen_butt[0]->down_box(GMSH_TOGGLE_BOX);
-      gen_butt[0]->selection_color(GMSH_TOGGLE_COLOR);
-
-      gen_butt[1] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 3 * BH, BW, BH, "Show small axes");
-      gen_butt[1]->tooltip("(Alt+a)");
-      gen_butt[1]->type(FL_TOGGLE_BUTTON);
-      gen_butt[1]->down_box(GMSH_TOGGLE_BOX);
-      gen_butt[1]->selection_color(GMSH_TOGGLE_COLOR);
-	
-      gen_butt[6] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 4 * BH, BW, BH, "Show bounding boxes");
+      gen_butt[6] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 2 * BH, BW, BH, "Show bounding boxes");
       gen_butt[6]->tooltip("(Alt+b)");
       gen_butt[6]->type(FL_TOGGLE_BUTTON);
       gen_butt[6]->down_box(GMSH_TOGGLE_BOX);
       gen_butt[6]->selection_color(GMSH_TOGGLE_COLOR);
 
-      gen_butt[2] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 5 * BH, BW, BH, "Draw simplified model while rotating, panning and zooming");
+      gen_butt[2] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 3 * BH, BW, BH, "Draw simplified model while rotating, panning and zooming");
       gen_butt[2]->tooltip("(Alt+f)");
       gen_butt[2]->type(FL_TOGGLE_BUTTON);
       gen_butt[2]->down_box(GMSH_TOGGLE_BOX);
       gen_butt[2]->selection_color(GMSH_TOGGLE_COLOR);
 
-      gen_butt[3] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Enable double buffering");
+      gen_butt[3] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 4 * BH, BW, BH, "Enable double buffering");
       gen_butt[3]->type(FL_TOGGLE_BUTTON);
       gen_butt[3]->down_box(GMSH_TOGGLE_BOX);
       gen_butt[3]->selection_color(GMSH_TOGGLE_COLOR);
 
-      gen_butt[5] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 7 * BH, BW, BH, "Use trackball rotation mode instead of Euler angles");
+      gen_butt[5] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 5 * BH, BW, BH, "Use trackball rotation mode instead of Euler angles");
       gen_butt[5]->type(FL_TOGGLE_BUTTON);
       gen_butt[5]->down_box(GMSH_TOGGLE_BOX);
       gen_butt[5]->selection_color(GMSH_TOGGLE_COLOR);
 
-      gen_butt[15] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 8 * BH, BW, BH, "Rotate around pseudo center of mass");
+      gen_butt[15] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 6 * BH, BW, BH, "Rotate around pseudo center of mass");
       gen_butt[15]->type(FL_TOGGLE_BUTTON);
       gen_butt[15]->down_box(GMSH_TOGGLE_BOX);
       gen_butt[15]->selection_color(GMSH_TOGGLE_COLOR);
       gen_butt[15]->callback(general_options_rotation_center_cb);
 
-      gen_push_butt[0] = new Fl_Button(L + 2 * IW - 2 * WB, 2 * WB + 9 * BH, BB, BH, "Select");
+      gen_push_butt[0] = new Fl_Button(L + 2 * IW - 2 * WB, 2 * WB + 7 * BH, BB, BH, "Select");
       gen_push_butt[0]->callback(general_options_rotation_center_select_cb);
 
-      gen_value[8] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 9 * BH, IW / 3, BH);
-      gen_value[9] = new Fl_Value_Input(L + 2 * WB + IW / 3, 2 * WB + 9 * BH, IW / 3, BH);
-      gen_value[10] = new Fl_Value_Input(L + 2 * WB + 2 * IW / 3, 2 * WB + 9 * BH, IW / 3, BH, "Rotation center");
+      gen_value[8] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 7 * BH, IW / 3, BH);
+      gen_value[9] = new Fl_Value_Input(L + 2 * WB + IW / 3, 2 * WB + 7 * BH, IW / 3, BH);
+      gen_value[10] = new Fl_Value_Input(L + 2 * WB + 2 * IW / 3, 2 * WB + 7 * BH, IW / 3, BH, "Rotation center");
       gen_value[10]->align(FL_ALIGN_RIGHT);
 
       o->end();
     }
+    {
+      Fl_Group *o = new Fl_Group(L + WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Axes");
+
+      gen_choice[4] = new Fl_Choice(L + 2 * WB, 2 * WB + 1 * BH, IW, BH, "Axes mode");
+      gen_choice[4]->menu(menu_axes_mode);
+      gen_choice[4]->align(FL_ALIGN_RIGHT);
+      gen_choice[4]->tooltip("(Alt+a)");
+
+      gen_value[17] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 2 * BH, IW/3, BH);
+      gen_value[17]->minimum(0.);
+      gen_value[17]->step(1);
+      gen_value[17]->maximum(100);
+      gen_value[18] = new Fl_Value_Input(L + 2 * WB + 1*IW/3, 2 * WB + 2 * BH, IW/3, BH);
+      gen_value[18]->minimum(0.);
+      gen_value[18]->step(1);
+      gen_value[18]->maximum(100);
+      gen_value[19] = new Fl_Value_Input(L + 2 * WB + 2*IW/3, 2 * WB + 2 * BH, IW/3, BH, "Axes tics");
+      gen_value[19]->minimum(0.);
+      gen_value[19]->step(1);
+      gen_value[19]->maximum(100);
+      gen_value[19]->align(FL_ALIGN_RIGHT);
+
+      gen_input[3] = new Fl_Input(L + 2 * WB, 2 * WB + 3 * BH, IW/3, BH);
+      gen_input[4] = new Fl_Input(L + 2 * WB + 1*IW/3, 2 * WB + 3 * BH, IW/3, BH);
+      gen_input[5] = new Fl_Input(L + 2 * WB + 2*IW/3, 2 * WB + 3 * BH, IW/3, BH, "Axes format");
+      gen_input[5]->align(FL_ALIGN_RIGHT);
+      
+      gen_input[6] = new Fl_Input(L + 2 * WB, 2 * WB + 4 * BH, IW/3, BH);
+      gen_input[7] = new Fl_Input(L + 2 * WB + 1*IW/3, 2 * WB + 4 * BH, IW/3, BH);
+      gen_input[8] = new Fl_Input(L + 2 * WB + 2*IW/3, 2 * WB + 4 * BH, IW/3, BH, "Axes labels");
+      gen_input[8]->align(FL_ALIGN_RIGHT);
+
+      gen_butt[0] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 5 * BH, BW, BH, "Set position and size of axes automatically");
+      gen_butt[0]->type(FL_TOGGLE_BUTTON);
+      gen_butt[0]->down_box(GMSH_TOGGLE_BOX);
+      gen_butt[0]->selection_color(GMSH_TOGGLE_COLOR);
+      
+      gen_value[20] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 6 * BH, IW / 3, BH);
+      gen_value[21] = new Fl_Value_Input(L + 2 * WB + IW / 3, 2 * WB + 6 * BH, IW / 3, BH);
+      gen_value[22] = new Fl_Value_Input(L + 2 * WB + 2 * IW / 3, 2 * WB + 6 * BH, IW / 3, BH, "Axes minimum");
+      gen_value[22]->align(FL_ALIGN_RIGHT);
+
+      gen_value[23] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 7 * BH, IW / 3, BH);
+      gen_value[24] = new Fl_Value_Input(L + 2 * WB + IW / 3, 2 * WB + 7 * BH, IW / 3, BH);
+      gen_value[25] = new Fl_Value_Input(L + 2 * WB + 2 * IW / 3, 2 * WB + 7 * BH, IW / 3, BH, "Axes maximum");
+      gen_value[25]->align(FL_ALIGN_RIGHT);
+
+      gen_butt[1] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 8 * BH, BW, BH, "Show small axes");
+      gen_butt[1]->tooltip("(Alt+Shift+a)");
+      gen_butt[1]->type(FL_TOGGLE_BUTTON);
+      gen_butt[1]->down_box(GMSH_TOGGLE_BOX);
+      gen_butt[1]->selection_color(GMSH_TOGGLE_COLOR);
+
+      gen_value[26] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 9 * BH, IW / 2, BH);
+      gen_value[26]->minimum(-1024);
+      gen_value[26]->maximum(1024);
+      gen_value[26]->step(1);
+      gen_value[27] = new Fl_Value_Input(L + 2 * WB + IW / 2, 2 * WB + 9 * BH, IW / 2, BH, "Small axes position");
+      gen_value[27]->align(FL_ALIGN_RIGHT);
+      gen_value[27]->minimum(-1024);
+      gen_value[27]->maximum(1024);
+      gen_value[27]->step(1);
+
+      o->end();
+    }
     {
       Fl_Group *o = new Fl_Group(L + WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Output");
       gen_butt[7] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 1 * BH, BW, BH, "Print messages on terminal");
@@ -2474,119 +2536,114 @@ void GUI::create_option_window()
     {
       Fl_Group *o = new Fl_Group(L + WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "General");
 
-      view_butt[1] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 1 * BH, BW / 2 - WB, BH, "3D view");
-      view_butt[1]->type(FL_RADIO_BUTTON);
-      view_butt[1]->down_box(GMSH_RADIO_BOX);
-      view_butt[1]->selection_color(GMSH_RADIO_COLOR);
-
-      view_butt[2] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 2 * BH, BW / 2 - WB, BH, "2D space table");
-      view_butt[2]->type(FL_RADIO_BUTTON);
-      view_butt[2]->down_box(GMSH_RADIO_BOX);
-      view_butt[2]->selection_color(GMSH_RADIO_COLOR);
+      view_input[0] = new Fl_Input(L + 2 * WB, 2 * WB + 1 * BH, IW, BH, "Name");
+      view_input[0]->align(FL_ALIGN_RIGHT);
 
-      view_butt[3] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 3 * BH, BW / 2 - WB, BH, "2D time table");
-      view_butt[3]->type(FL_RADIO_BUTTON);
-      view_butt[3]->down_box(GMSH_RADIO_BOX);
-      view_butt[3]->selection_color(GMSH_RADIO_COLOR);
+      view_input[1] = new Fl_Input(L + 2 * WB, 2 * WB + 2 * BH, IW, BH, "Format");
+      view_input[1]->align(FL_ALIGN_RIGHT);
 
       int sw = (int)(1.5 * fontsize);
-      view_butt_rep[0] = new Fl_Repeat_Button(L + 2 * WB, 2 * WB + 4 * BH, sw, BH, "-");
+      view_butt_rep[0] = new Fl_Repeat_Button(L + 2 * WB, 2 * WB + 3 * BH, sw, BH, "-");
       view_butt_rep[0]->callback(view_options_timestep_decr_cb);
-      view_butt_rep[1] = new Fl_Repeat_Button(L + 2 * WB + IW - sw, 2 * WB + 4 * BH, sw, BH, "+");
+      view_butt_rep[1] = new Fl_Repeat_Button(L + 2 * WB + IW - sw, 2 * WB + 3 * BH, sw, BH, "+");
       view_butt_rep[1]->callback(view_options_timestep_incr_cb);
-      view_value[50] = new Fl_Value_Input(L + 2 * WB + sw, 2 * WB + 4 * BH, IW - 2 * sw, BH);
+      view_value[50] = new Fl_Value_Input(L + 2 * WB + sw, 2 * WB + 3 * BH, IW - 2 * sw, BH);
       view_value[50]->callback(view_options_timestep_cb);
       view_value[50]->align(FL_ALIGN_RIGHT);
       view_value[50]->minimum(0);
       view_value[50]->maximum(0);
       view_value[50]->step(1);
-      Fl_Box *a = new Fl_Box(L + 2 * WB + IW, 2 * WB + 4 * BH, IW / 2, BH, "Step");
+      Fl_Box *a = new Fl_Box(L + 2 * WB + IW, 2 * WB + 3 * BH, IW / 2, BH, "Step");
       a->box(FL_NO_BOX);
       a->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
 
-      view_input[0] = new Fl_Input(L + 2 * WB, 2 * WB + 5 * BH, IW, BH, "Name");
-      view_input[0]->align(FL_ALIGN_RIGHT);
+      Fl_Box *b = new Fl_Box(FL_EMBOSSED_FRAME, L + 2 * WB, 2 * WB + 5 * BH-WB/2, width/2-3*WB, 3*BH+WB, "Graph type");
+      b->align(FL_ALIGN_TOP|FL_ALIGN_CENTER);
 
-      view_input[1] = new Fl_Input(L + 2 * WB, 2 * WB + 6 * BH, IW, BH, "Format");
-      view_input[1]->align(FL_ALIGN_RIGHT);
+      view_butt[1] = new Fl_Check_Button(L + 3 * WB, 2 * WB + 5 * BH, BW/2-3*WB, BH, "3D view");
+      view_butt[1]->type(FL_RADIO_BUTTON);
+      view_butt[1]->down_box(GMSH_RADIO_BOX);
+      view_butt[1]->selection_color(GMSH_RADIO_COLOR);
 
-      static Fl_Menu_Item menu_grid_mode[] = {
-	{"None", 0, 0, 0},
-	{"Axes", 0, 0, 0},
-	{"Box", 0, 0, 0},
-	{"Full grid", 0, 0, 0},
-	{"Open grid", 0, 0, 0},
-	{0}
-      };
-      view_choice[8] = new Fl_Choice(L + 2 * WB, 2 * WB + 7 * BH, IW, BH, "Grid");
-      view_choice[8]->menu(menu_grid_mode);
+      view_butt[2] = new Fl_Check_Button(L + 3 * WB, 2 * WB + 6 * BH, BW/2-3*WB, BH, "2D space table");
+      view_butt[2]->type(FL_RADIO_BUTTON);
+      view_butt[2]->down_box(GMSH_RADIO_BOX);
+      view_butt[2]->selection_color(GMSH_RADIO_COLOR);
+
+      view_butt[3] = new Fl_Check_Button(L + 3 * WB, 2 * WB + 7 * BH, BW/2-3*WB, BH, "2D time table");
+      view_butt[3]->type(FL_RADIO_BUTTON);
+      view_butt[3]->down_box(GMSH_RADIO_BOX);
+      view_butt[3]->selection_color(GMSH_RADIO_COLOR);
+
+      view_choice[8] = new Fl_Choice(L + width / 2, 2 * WB + 1 * BH, IW, BH, "Axes");
+      view_choice[8]->menu(menu_axes_mode);
       view_choice[8]->align(FL_ALIGN_RIGHT);
       view_choice[8]->tooltip("(Alt+g)");
 
-      view_value[3] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 8 * BH, IW/3, BH);
+      view_value[3] = new Fl_Value_Input(L + width / 2, 2 * WB + 2 * BH, IW/3, BH);
       view_value[3]->minimum(0.);
       view_value[3]->step(1);
       view_value[3]->maximum(100);
-      view_value[4] = new Fl_Value_Input(L + 2 * WB + 1*IW/3, 2 * WB + 8 * BH, IW/3, BH);
+      view_value[4] = new Fl_Value_Input(L + width / 2 + 1*IW/3, 2 * WB + 2 * BH, IW/3, BH);
       view_value[4]->minimum(0.);
       view_value[4]->step(1);
       view_value[4]->maximum(100);
-      view_value[5] = new Fl_Value_Input(L + 2 * WB + 2*IW/3, 2 * WB + 8 * BH, IW/3, BH, "Axes tics");
+      view_value[5] = new Fl_Value_Input(L + width / 2 + 2*IW/3, 2 * WB + 2 * BH, IW/3, BH, "Tics");
       view_value[5]->minimum(0.);
       view_value[5]->step(1);
       view_value[5]->maximum(100);
       view_value[5]->align(FL_ALIGN_RIGHT);
 
-      view_input[7] = new Fl_Input(L + 2 * WB, 2 * WB + 9 * BH, IW/3, BH);
-      view_input[8] = new Fl_Input(L + 2 * WB + 1*IW/3, 2 * WB + 9 * BH, IW/3, BH);
-      view_input[9] = new Fl_Input(L + 2 * WB + 2*IW/3, 2 * WB + 9 * BH, IW/3, BH, "Axes format");
+      view_input[7] = new Fl_Input(L + width / 2, 2 * WB + 3 * BH, IW/3, BH);
+      view_input[8] = new Fl_Input(L + width / 2 + 1*IW/3, 2 * WB + 3 * BH, IW/3, BH);
+      view_input[9] = new Fl_Input(L + width / 2 + 2*IW/3, 2 * WB + 3 * BH, IW/3, BH, "Format");
       view_input[9]->align(FL_ALIGN_RIGHT);
       
-      view_input[10] = new Fl_Input(L + 2 * WB, 2 * WB + 10 * BH, IW/3, BH);
-      view_input[11] = new Fl_Input(L + 2 * WB + 1*IW/3, 2 * WB + 10 * BH, IW/3, BH);
-      view_input[12] = new Fl_Input(L + 2 * WB + 2*IW/3, 2 * WB + 10 * BH, IW/3, BH, "Axes labels");
+      view_input[10] = new Fl_Input(L + width / 2, 2 * WB + 4 * BH, IW/3, BH);
+      view_input[11] = new Fl_Input(L + width / 2 + 1*IW/3, 2 * WB + 4 * BH, IW/3, BH);
+      view_input[12] = new Fl_Input(L + width / 2 + 2*IW/3, 2 * WB + 4 * BH, IW/3, BH, "Labels");
       view_input[12]->align(FL_ALIGN_RIGHT);
       
-      view_butt[7] = new Fl_Check_Button(L + width / 2, 2 * WB + 1 * BH, BW / 2 - WB, BH, "Automatic 2D grid position");
+      view_butt[25] = new Fl_Check_Button(L + width / 2, 2 * WB + 5 * BH, BW / 2 - WB, BH, "Automatic 3D positioning");
+      view_butt[25]->type(FL_TOGGLE_BUTTON);
+      view_butt[25]->down_box(GMSH_TOGGLE_BOX);
+      view_butt[25]->selection_color(GMSH_TOGGLE_COLOR);
+      
+      view_value[13] = new Fl_Value_Input(L + width / 2, 2 * WB + 6 * BH, IW / 3, BH);
+      view_value[14] = new Fl_Value_Input(L + width / 2 + IW / 3, 2 * WB + 6 * BH, IW / 3, BH);
+      view_value[15] = new Fl_Value_Input(L + width / 2 + 2 * IW / 3, 2 * WB + 6 * BH, IW / 3, BH, "Minimum");
+      view_value[15]->align(FL_ALIGN_RIGHT);
+
+      view_value[16] = new Fl_Value_Input(L + width / 2, 2 * WB + 7 * BH, IW / 3, BH);
+      view_value[17] = new Fl_Value_Input(L + width / 2 + IW / 3, 2 * WB + 7 * BH, IW / 3, BH);
+      view_value[18] = new Fl_Value_Input(L + width / 2 + 2 * IW / 3, 2 * WB + 7 * BH, IW / 3, BH, "Maximum");
+      view_value[18]->align(FL_ALIGN_RIGHT);
+
+      view_butt[7] = new Fl_Check_Button(L + width / 2, 2 * WB + 8 * BH, BW / 2 - WB, BH, "Automatic 2D positioning");
       view_butt[7]->type(FL_TOGGLE_BUTTON);
       view_butt[7]->down_box(GMSH_TOGGLE_BOX);
       view_butt[7]->selection_color(GMSH_TOGGLE_COLOR);
       
-      view_value[20] = new Fl_Value_Input(L + width / 2, 2 * WB + 2 * BH, IW / 2, BH);
+      view_value[20] = new Fl_Value_Input(L + width / 2, 2 * WB + 9 * BH, IW / 2, BH);
       view_value[20]->minimum(0);
       view_value[20]->maximum(1024);
       view_value[20]->step(1);
-      view_value[21] = new Fl_Value_Input(L + width / 2 + IW / 2, 2 * WB + 2 * BH, IW / 2, BH, "Position");
+      view_value[21] = new Fl_Value_Input(L + width / 2 + IW / 2, 2 * WB + 9 * BH, IW / 2, BH, "Position");
       view_value[21]->align(FL_ALIGN_RIGHT);
       view_value[21]->minimum(0);
       view_value[21]->maximum(1024);
       view_value[21]->step(1);
 
-      view_value[22] = new Fl_Value_Input(L + width / 2, 2 * WB + 3 * BH, IW / 2, BH);
+      view_value[22] = new Fl_Value_Input(L + width / 2, 2 * WB + 10 * BH, IW / 2, BH);
       view_value[22]->minimum(0);
       view_value[22]->maximum(1024);
       view_value[22]->step(1);
-      view_value[23] = new Fl_Value_Input(L + width / 2 + IW / 2, 2 * WB + 3 * BH, IW / 2, BH, "Size");
+      view_value[23] = new Fl_Value_Input(L + width / 2 + IW / 2, 2 * WB + 10 * BH, IW / 2, BH, "Size");
       view_value[23]->align(FL_ALIGN_RIGHT);
       view_value[23]->minimum(0);
       view_value[23]->maximum(1024);
       view_value[23]->step(1);
 
-      view_butt[25] = new Fl_Check_Button(L + width / 2, 2 * WB + 4 * BH, BW / 2 - WB, BH, "Automatic 3D grid position");
-      view_butt[25]->type(FL_TOGGLE_BUTTON);
-      view_butt[25]->down_box(GMSH_TOGGLE_BOX);
-      view_butt[25]->selection_color(GMSH_TOGGLE_COLOR);
-      
-      view_value[13] = new Fl_Value_Input(L + width / 2, 2 * WB + 5 * BH, IW / 3, BH);
-      view_value[14] = new Fl_Value_Input(L + width / 2 + IW / 3, 2 * WB + 5 * BH, IW / 3, BH);
-      view_value[15] = new Fl_Value_Input(L + width / 2 + 2 * IW / 3, 2 * WB + 5 * BH, IW / 3, BH, "Minimum");
-      view_value[15]->align(FL_ALIGN_RIGHT);
-
-      view_value[16] = new Fl_Value_Input(L + width / 2, 2 * WB + 6 * BH, IW / 3, BH);
-      view_value[17] = new Fl_Value_Input(L + width / 2 + IW / 3, 2 * WB + 6 * BH, IW / 3, BH);
-      view_value[18] = new Fl_Value_Input(L + width / 2 + 2 * IW / 3, 2 * WB + 6 * BH, IW / 3, BH, "Maximum");
-      view_value[18]->align(FL_ALIGN_RIGHT);
-
       o->end();
     }
     {
@@ -3024,18 +3081,29 @@ void GUI::update_view_window(int num)
     view_butt[3]->deactivate();
   }
 
-  opt_view_auto_position2d(num, GMSH_GUI, 0);
+  opt_view_auto_position(num, GMSH_GUI, 0);
   opt_view_position0(num, GMSH_GUI, 0);
   opt_view_position1(num, GMSH_GUI, 0);
   opt_view_size0(num, GMSH_GUI, 0);
   opt_view_size1(num, GMSH_GUI, 0);
-  opt_view_auto_position3d(num, GMSH_GUI, 0);
-  opt_view_position_xmin(num, GMSH_GUI, 0);
-  opt_view_position_xmax(num, GMSH_GUI, 0);
-  opt_view_position_ymin(num, GMSH_GUI, 0);
-  opt_view_position_ymax(num, GMSH_GUI, 0);
-  opt_view_position_zmin(num, GMSH_GUI, 0);
-  opt_view_position_zmax(num, GMSH_GUI, 0);
+
+  opt_view_axes(num, GMSH_GUI, 0);
+  opt_view_axes_format0(num, GMSH_GUI, NULL);
+  opt_view_axes_format1(num, GMSH_GUI, NULL);
+  opt_view_axes_format2(num, GMSH_GUI, NULL);
+  opt_view_axes_tics0(num, GMSH_GUI, 0);
+  opt_view_axes_tics1(num, GMSH_GUI, 0);
+  opt_view_axes_tics2(num, GMSH_GUI, 0);
+  opt_view_axes_label0(num, GMSH_GUI, NULL);
+  opt_view_axes_label1(num, GMSH_GUI, NULL);
+  opt_view_axes_label2(num, GMSH_GUI, NULL);
+  opt_view_axes_auto_position(num, GMSH_GUI, 0);
+  opt_view_axes_xmin(num, GMSH_GUI, 0);
+  opt_view_axes_xmax(num, GMSH_GUI, 0);
+  opt_view_axes_ymin(num, GMSH_GUI, 0);
+  opt_view_axes_ymax(num, GMSH_GUI, 0);
+  opt_view_axes_zmin(num, GMSH_GUI, 0);
+  opt_view_axes_zmax(num, GMSH_GUI, 0);
   for(int i = 13; i <= 18; i++){
     view_value[i]->step(CTX.lc/200.);
     view_value[i]->minimum(-CTX.lc);
@@ -3071,17 +3139,6 @@ void GUI::update_view_window(int num)
   opt_view_normals(num, GMSH_GUI, 0);
   opt_view_tangents(num, GMSH_GUI, 0);
 
-  opt_view_grid(num, GMSH_GUI, 0);
-  opt_view_axes_format0(num, GMSH_GUI, NULL);
-  opt_view_axes_format1(num, GMSH_GUI, NULL);
-  opt_view_axes_format2(num, GMSH_GUI, NULL);
-  opt_view_nb_tics0(num, GMSH_GUI, 0);
-  opt_view_nb_tics1(num, GMSH_GUI, 0);
-  opt_view_nb_tics2(num, GMSH_GUI, 0);
-  opt_view_axes_label0(num, GMSH_GUI, NULL);
-  opt_view_axes_label1(num, GMSH_GUI, NULL);
-  opt_view_axes_label2(num, GMSH_GUI, NULL);
-
   opt_view_nb_iso(num, GMSH_GUI, 0);
   opt_view_intervals_type(num, GMSH_GUI, 0);
   int range_type = (int)opt_view_range_type(num, GMSH_GUI, 0);
diff --git a/Fltk/GUI.h b/Fltk/GUI.h
index 12c094fbb57660fa497a7d24589f9f7ce5741a00..1bc32578908b3edebf3b5e79535855a4de21d2ec 100644
--- a/Fltk/GUI.h
+++ b/Fltk/GUI.h
@@ -162,7 +162,7 @@ public:
   Fl_Group         *gen_group ;
   Fl_Check_Button  *gen_butt[20] ;
   Fl_Button        *gen_push_butt[20] ;
-  Fl_Value_Input   *gen_value[20] ;
+  Fl_Value_Input   *gen_value[50] ;
   Fl_Button        *gen_col[50] ;
   Fl_Input         *gen_input[20] ;
   Fl_Choice        *gen_choice[20] ;
diff --git a/Graphics/Axes.cpp b/Graphics/Axes.cpp
deleted file mode 100644
index 3658b7b76339c38560bb291d423ee47170656b72..0000000000000000000000000000000000000000
--- a/Graphics/Axes.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-// $Id: Axes.cpp,v 1.26 2005-03-11 05:47:55 geuzaine Exp $
-//
-// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-// USA.
-// 
-// Please report all bugs and problems to <gmsh@geuz.org>.
-
-#include "Gmsh.h"
-#include "GmshUI.h"
-#include "Numeric.h"
-#include "Mesh.h"
-#include "Draw.h"
-#include "Context.h"
-#include "gl2ps.h"
-
-extern Context_T CTX;
-
-void Draw_Axes()
-{
-  if(!CTX.range[0] && !CTX.range[1] && !CTX.range[2])
-    return;
-
-  double s = CTX.axes_size * CTX.pixel_equiv_x / CTX.s[0];
-
-  if(s == 0.)
-    return;
-
-  double f = 0.666 * s;
-  double g = 1.233 * s;
-  double b = .1 * s;
-  double c = 0.666 * b;
-
-  glLineWidth(CTX.line_width);
-  gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-  glColor4ubv((GLubyte *) & CTX.color.axes);
-
-  glBegin(GL_LINES);
-  if(CTX.range[2] != 0.) {
-    // X
-    glVertex3d(0., 0., 0.);
-    glVertex3d(s, 0., 0.);
-    glVertex3d(g - b, b, 0.);
-    glVertex3d(g + b, -b, 0.);
-    glVertex3d(g, -b, b);
-    glVertex3d(g, b, -b);
-    // Y
-    glVertex3d(0., 0., 0.);
-    glVertex3d(0., s, 0.);
-    glVertex3d(-b, g + b, 0.);
-    glVertex3d(0., g, 0.);
-    glVertex3d(0., g, 0.);
-    glVertex3d(0., g + b, -b);
-    glVertex3d(0., g, 0.);
-    glVertex3d(.5 * b, g - b, .5 * b);
-    // Z
-    glVertex3d(0., 0., 0.);
-    glVertex3d(0., 0., s);
-    glVertex3d(-b, b, g);
-    glVertex3d(0., b, g - b);
-    glVertex3d(0., b, g - b);
-    glVertex3d(0., -b, g + b);
-    glVertex3d(0., -b, g + b);
-    glVertex3d(b, -b, g);
-  }
-  else {
-    // X
-    glVertex3d(0., 0., 0.);
-    glVertex3d(s, 0., 0.);
-    glVertex3d(g - c, b, 0.);
-    glVertex3d(g + c, -b, 0.);
-    glVertex3d(g - c, -b, 0.);
-    glVertex3d(g + c, b, 0.);
-    // Y
-    glVertex3d(0., 0., 0.);
-    glVertex3d(0., s, 0.);
-    glVertex3d(-c, g + b, 0.);
-    glVertex3d(0., g, 0.);
-    glVertex3d(0., g, 0.);
-    glVertex3d(c, g + b, 0.);
-    glVertex3d(0., g, 0.);
-    glVertex3d(0., g - b, 0.);
-  }
-  glEnd();
-
-  glEnable(GL_LINE_STIPPLE);
-  glLineStipple(1, 0x087F);
-  gl2psEnable(GL2PS_LINE_STIPPLE);
-  glBegin(GL_LINES);
-  if(CTX.range[2] != 0.) {
-    glVertex3d(f, 0., 0.);
-    glVertex3d(f, 0., f);
-    glVertex3d(f, 0., f);
-    glVertex3d(0., 0., f);
-    glVertex3d(0., 0., f);
-    glVertex3d(0., f, f);
-    glVertex3d(0., f, f);
-    glVertex3d(0., f, 0.);
-  }
-  glVertex3d(0., f, 0.);
-  glVertex3d(f, f, 0.);
-  glVertex3d(f, f, 0.);
-  glVertex3d(f, 0., 0.);
-  glEnd();
-  glDisable(GL_LINE_STIPPLE);
-  gl2psDisable(GL2PS_LINE_STIPPLE);
-}
-
-void Draw_SmallAxes(void)
-{
-  double l, o, xx, xy, yx, yy, zx, zy, cx, cy;
-
-  l = CTX.small_axes_size;
-  o = 2;
-
-  if(CTX.small_axes_pos[0] > 0)
-    cx = CTX.viewport[0] + CTX.small_axes_pos[0];
-  else
-    cx = CTX.viewport[2] + CTX.small_axes_pos[0];
-
-  if(CTX.small_axes_pos[1] > 0)
-    cy = CTX.viewport[3] - CTX.small_axes_pos[1];
-  else
-    cy = CTX.viewport[1] - CTX.small_axes_pos[1];
-
-  xx = l * CTX.rot[0];
-  xy = l * CTX.rot[1];
-  yx = l * CTX.rot[4];
-  yy = l * CTX.rot[5];
-  zx = l * CTX.rot[8];
-  zy = l * CTX.rot[9];
-
-  glLineWidth(CTX.line_width);
-  gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
-  glColor4ubv((GLubyte *) & CTX.color.small_axes);
-
-  glBegin(GL_LINES);
-  glVertex2d(cx, cy);
-  glVertex2d(cx + xx, cy + xy);
-  glVertex2d(cx, cy);
-  glVertex2d(cx + yx, cy + yy);
-  glVertex2d(cx, cy);
-  glVertex2d(cx + zx, cy + zy);
-  glEnd();
-  glRasterPos2d(cx + xx + o, cy + xy + o);
-  Draw_String("X");
-  glRasterPos2d(cx + yx + o, cy + yy + o);
-  Draw_String("Y");
-  glRasterPos2d(cx + zx + o, cy + zy + o);
-  Draw_String("Z");
-}
diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp
index 48d1efee2762b2ffaf8af0f7225da2bcc87dffea..7d3a82882c8709458702ae836249537deabf463c 100644
--- a/Graphics/Draw.cpp
+++ b/Graphics/Draw.cpp
@@ -1,4 +1,4 @@
-// $Id: Draw.cpp,v 1.75 2005-03-11 08:56:38 geuzaine Exp $
+// $Id: Draw.cpp,v 1.76 2005-03-12 07:52:55 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -45,7 +45,7 @@ int NeedPolygonOffset()
   for(int i = 0; i < List_Nbr(CTX.post.list); i++){
     Post_View *v = *(Post_View**)List_Pointer(CTX.post.list, i);
     if(v->Visible){
-      if(v->ShowElement || v->Grid)
+      if(v->ShowElement || v->Axes)
 	return 1;
       if((v->NbST || v->NbSQ) && (v->IntervalsType == DRAW_POST_ISO))
 	return 1;
@@ -275,6 +275,12 @@ void InitPosition(void)
     glTranslated(-CTX.rotation_center[0],
 		 -CTX.rotation_center[1],
 		 -CTX.rotation_center[2]);
+
+  // store the projection and modelview matrices at this precise
+  // moment (so that we can use them at any later time, even if the
+  // context has changed, i.e., even if we are out of Draw())
+  glGetDoublev(GL_PROJECTION_MATRIX, CTX.proj);
+  glGetDoublev(GL_MODELVIEW_MATRIX, CTX.model);
 }
 
 // Entity selection
@@ -355,18 +361,18 @@ void Filter_SelectionBuffer(int n, GLuint * typ, GLuint * ient,
 void unproject(double x, double y, double p[3], double d[3])
 {
   GLint viewport[4];
-  GLdouble model[16], proj[16];
   glGetIntegerv(GL_VIEWPORT, viewport);
-  glGetDoublev(GL_PROJECTION_MATRIX, proj);
-  glGetDoublev(GL_MODELVIEW_MATRIX, model);
 
   y = viewport[3]-y;
 
   GLdouble x0, y0, z0, x1, y1, z1;
+
+  // we use CTX.model and CTX.proj instead of directly getGetDouble'ing
+  // the matrices since unproject can be called in or after Draw2D
   
-  if(!gluUnProject(x, y, 0.0, model, proj, viewport, &x0, &y0, &z0))
+  if(!gluUnProject(x, y, 0.0, CTX.model, CTX.proj, viewport, &x0, &y0, &z0))
     Msg(WARNING, "unproject1 failed");
-  if(!gluUnProject(x, y, 1.0, model, proj, viewport, &x1, &y1, &z1))
+  if(!gluUnProject(x, y, 1.0, CTX.model, CTX.proj, viewport, &x1, &y1, &z1))
     Msg(WARNING, "unproject2 failed");
   
   p[0] = x0;
diff --git a/Graphics/Draw.h b/Graphics/Draw.h
index e2b205349c86736779fcfbef01c284e9e10f752b..6115aa5bb90d1ba5e43b8fe7bdffece612c23cc7 100644
--- a/Graphics/Draw.h
+++ b/Graphics/Draw.h
@@ -69,8 +69,6 @@ void Draw_Text2D3D(int dim, int timestep, int nb, List_T *td, List_T *tc);
 void FixText2DCoordinates(double *x, double *y);
 void Draw_OnScreenMessages(void);
 void Draw_Scales(void);
-void Draw_Axes(void);
-void Draw_SmallAxes(void);
 void Draw_Disk(double size, double rint, double x, double y, double z, int light);
 void Draw_Sphere(double size, double x, double y, double z, int light);
 void Draw_Cylinder(double width, double *x, double *y, double *z, int light);
@@ -85,8 +83,9 @@ void Draw_Vector(int Type, int Fill,
 void Draw_PlaneInBoundingBox(double xmin, double ymin, double zmin,
 			     double xmax, double ymax, double zmax,
 			     double a, double b, double c, double d);
-void Draw_3DGrid(int mode, int tics[3], char format[3][256], char label[3][256],
-		 double bbox[6]);
+void Draw_SmallAxes(void);
+void Draw_Axes(int mode, int tics[3], char format[3][256], char label[3][256],
+	       double bbox[6]);
 
 void Draw_Mesh(Mesh *M);
 void Draw_Mesh_Volume(void *a, void *b);
diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp
index 8d4807e87f3ca2ed3b22213340c42a3eb800c5b7..809b106f372f00a371751267086f17bada447c08 100644
--- a/Graphics/Entity.cpp
+++ b/Graphics/Entity.cpp
@@ -1,4 +1,4 @@
-// $Id: Entity.cpp,v 1.58 2005-03-12 00:59:41 geuzaine Exp $
+// $Id: Entity.cpp,v 1.59 2005-03-12 07:52:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -503,20 +503,67 @@ void Draw_PlaneInBoundingBox(double xmin, double ymin, double zmin,
   }
 }
 
+void Draw_SmallAxes()
+{
+  double l, o, xx, xy, yx, yy, zx, zy, cx, cy;
+
+  l = CTX.small_axes_size;
+  o = 2;
+
+  if(CTX.small_axes_pos[0] > 0)
+    cx = CTX.viewport[0] + CTX.small_axes_pos[0];
+  else
+    cx = CTX.viewport[2] + CTX.small_axes_pos[0];
+
+  if(CTX.small_axes_pos[1] > 0)
+    cy = CTX.viewport[3] - CTX.small_axes_pos[1];
+  else
+    cy = CTX.viewport[1] - CTX.small_axes_pos[1];
+
+  xx = l * CTX.rot[0];
+  xy = l * CTX.rot[1];
+  yx = l * CTX.rot[4];
+  yy = l * CTX.rot[5];
+  zx = l * CTX.rot[8];
+  zy = l * CTX.rot[9];
+
+  glLineWidth(CTX.line_width);
+  gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
+  glColor4ubv((GLubyte *) & CTX.color.small_axes);
+
+  glBegin(GL_LINES);
+  glVertex2d(cx, cy);
+  glVertex2d(cx + xx, cy + xy);
+  glVertex2d(cx, cy);
+  glVertex2d(cx + yx, cy + yy);
+  glVertex2d(cx, cy);
+  glVertex2d(cx + zx, cy + zy);
+  glEnd();
+  glRasterPos2d(cx + xx + o, cy + xy + o);
+  Draw_String("X");
+  glRasterPos2d(cx + yx + o, cy + yy + o);
+  Draw_String("Y");
+  glRasterPos2d(cx + zx + o, cy + zy + o);
+  Draw_String("Z");
+}
+
 int Draw_Tics(int comp, int n, char *format, char *label,
 	      double p1[3], double p2[3], double perp[3])
 {
   // draws n tic marks (in direction perp) and labels along the line p1->p2
 
-  if(n < 2) return 0;
-
-  if(!strlen(format)) return n;
-
   double t[3] = { p2[0]-p1[0], p2[1]-p1[1], p2[2]-p1[2] };
   double l = norme(t);
   double w = 10 * CTX.pixel_equiv_x / CTX.s[0]; // big tics 10 pixels
   double w2 = 4 * CTX.pixel_equiv_x / CTX.s[0]; // small tics 4 pixels
 
+  glRasterPos3d(p2[0]+t[0]*w*1.4, p2[1]+t[1]*w*1.4, p2[2]+t[2]*w*1.4);
+  Draw_String(label);
+
+  if(n < 2) return 0;
+
+  if(!strlen(format)) return n;
+
   double lp = norme(perp);
   if(!lp){
     switch(comp){
@@ -575,9 +622,6 @@ int Draw_Tics(int comp, int n, char *format, char *label,
     Draw_String(str);
   }
 
-  glRasterPos3d(p2[0]+t[0]*w*1.4, p2[1]+t[1]*w*1.4, p2[2]+t[2]*w*1.4);
-  Draw_String(label);
-
   return n;
 }
 
@@ -617,8 +661,8 @@ void Draw_GridStipple(int n1, int n2, double p1[3], double p2[3], double p3[3])
   gl2psDisable(GL2PS_LINE_STIPPLE);
 }
 
-void Draw_3DGrid(int mode, int tics[3], char format[3][256], char label[3][256], 
-		 double bb[6])
+void Draw_Axes(int mode, int tics[3], char format[3][256], char label[3][256], 
+	       double bb[6])
 {
   // mode 0: nothing
   //      1: axes
@@ -633,8 +677,6 @@ void Draw_3DGrid(int mode, int tics[3], char format[3][256], char label[3][256],
   double ymin = bb[2], ymax = bb[3];
   double zmin = bb[4], zmax = bb[5];
 
-  glColor4ubv((GLubyte *) & CTX.color.fg);
-
   glBegin(GL_LINES);
   // 3 axes
   glVertex3d(xmin, ymin, zmin); glVertex3d(xmax, ymin, zmin);
diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp
index ed977f1fbb550113adcbea8432c56bd5435b7403..dcfd15659fcdfaa55c6ca299e9d65b7cba676b24 100644
--- a/Graphics/Graph2D.cpp
+++ b/Graphics/Graph2D.cpp
@@ -1,4 +1,4 @@
-// $Id: Graph2D.cpp,v 1.47 2005-03-12 00:59:41 geuzaine Exp $
+// $Id: Graph2D.cpp,v 1.48 2005-03-12 07:52:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -138,13 +138,13 @@ static void Draw_Graph2D(Post_View * v, double xx, double yy,
 
   // axes
 
-  if(v->Grid) {
+  if(v->Axes) {
     glColor4ubv((GLubyte *) & CTX.color.fg);
     glBegin(GL_LINE_STRIP);
     glVertex2d(xtop, ytop);
     glVertex2d(xtop, ytop - height);
     glVertex2d(xtop + width, ybot);
-    if(v->Grid > 1) {
+    if(v->Axes > 1) {
       glVertex2d(xtop + width, ytop);
       glVertex2d(xtop, ytop);
     }
@@ -160,17 +160,17 @@ static void Draw_Graph2D(Post_View * v, double xx, double yy,
   dy = height / (double)nb;
   dv = (ValMax - ValMin) / (double)nb;
   for(i = 0; i < nb + 1; i++) {
-    if(v->Grid > 0) {
+    if(v->Axes > 0) {
       glColor4ubv((GLubyte *) & CTX.color.fg);
       glBegin(GL_LINES);
       glVertex2d(xtop, ytop - i * dy);
       glVertex2d(xtop + tic, ytop - i * dy);
-      if(v->Grid > 1) {
+      if(v->Axes > 1) {
         glVertex2d(xtop + width - tic, ytop - i * dy);
         glVertex2d(xtop + width, ytop - i * dy);
       }
       glEnd();
-      if(v->Grid > 2 && i != 0 && i != nb) {
+      if(v->Axes > 2 && i != 0 && i != nb) {
         glEnable(GL_LINE_STIPPLE);
         glLineStipple(1, 0x1111);
         gl2psEnable(GL2PS_LINE_STIPPLE);
@@ -231,7 +231,7 @@ static void Draw_Graph2D(Post_View * v, double xx, double yy,
     AbsMax = *(double *)List_Pointer(v->Time, List_Nbr(v->Time) - 1);
   }
 
-  nb = v->NbTics[0];
+  nb = v->AxesTics[0];
   if(v->ShowScale) {
     sprintf(label, v->AxesFormat[0], -M_PI/1.e4);
     if((nb-1) * gl_width(label) > width)
@@ -242,17 +242,17 @@ static void Draw_Graph2D(Post_View * v, double xx, double yy,
   dx = width / (double)(nb - 1);
   
   for(i = 0; i < nb; i++) {
-    if(v->Grid > 0) {
+    if(v->Axes > 0) {
       glColor4ubv((GLubyte *) & CTX.color.fg);
       glBegin(GL_LINES);
       glVertex2d(xtop + i * dx, ybot);
       glVertex2d(xtop + i * dx, ybot + tic);
-      if(v->Grid > 1) {
+      if(v->Axes > 1) {
         glVertex2d(xtop + i * dx, ytop);
         glVertex2d(xtop + i * dx, ytop - tic);
       }
       glEnd();
-      if(v->Grid > 2 && i != 0 && i != nb - 1) {
+      if(v->Axes > 2 && i != 0 && i != nb - 1) {
         glEnable(GL_LINE_STIPPLE);
         glLineStipple(1, 0x1111);
         gl2psEnable(GL2PS_LINE_STIPPLE);
@@ -384,8 +384,8 @@ void Draw_Graph2D(void)
   for(int i = 0; i < List_Nbr(todraw); i++) {
     Post_View *v = *(Post_View **) List_Pointer(todraw, i);
 
-    if(!v->AutoPosition2D) {
-      Draw_Graph2D(v, v->Position2D[0], v->Position2D[1], v->Size2D[0], v->Size2D[1], tic);
+    if(!v->AutoPosition) {
+      Draw_Graph2D(v, v->Position[0], v->Position[1], v->Size[0], v->Size[1], tic);
     }
     else{
       double winw = CTX.viewport[2] - CTX.viewport[0];
diff --git a/Graphics/Makefile b/Graphics/Makefile
index f2f37ac4a3e4489a1f80328e51daf0b14e575ba7..16233b6552e4502ff9864e08863381635b245bf0 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.68 2005-03-11 05:47:55 geuzaine Exp $
+# $Id: Makefile,v 1.69 2005-03-12 07:52:56 geuzaine Exp $
 #
 # Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 #
@@ -36,7 +36,6 @@ SRC = Draw.cpp \
       ReadImg.cpp \
       Scale.cpp \
       Graph2D.cpp \
-      Axes.cpp \
       CreateFile.cpp \
       gl2ps.cpp\
       gl2gif.cpp\
@@ -159,15 +158,6 @@ Graph2D.o: Graph2D.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
   ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
   ../Common/GmshMatrix.h ../Common/AdaptiveViews.h gl2ps.h
-Axes.o: Axes.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
-  ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
-  ../Common/GmshUI.h ../Numeric/Numeric.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
-  ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \
-  ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \
-  ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \
-  ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \
-  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h \
-  gl2ps.h
 CreateFile.o: CreateFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
   ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h ../Mesh/Mesh.h \
diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp
index c53f8328b7e7b0d6cd924cdedcc3286b2ff34615..56fced8ca0e233414e9cc2ad40bef4f1ce73a266 100644
--- a/Graphics/Mesh.cpp
+++ b/Graphics/Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: Mesh.cpp,v 1.121 2005-03-11 05:47:55 geuzaine Exp $
+// $Id: Mesh.cpp,v 1.122 2005-03-12 07:52:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -197,6 +197,22 @@ void Draw_Mesh(Mesh * M)
 			      CTX.mesh.cut_planea, CTX.mesh.cut_planeb, 
 			      CTX.mesh.cut_planec, CTX.mesh.cut_planed);
   }
+
+  if(CTX.axes){
+    glColor4ubv((GLubyte *) & CTX.color.axes);
+    glLineWidth(CTX.line_width);
+    gl2psLineWidth(CTX.line_width * CTX.print.eps_line_width_factor);
+    if(!CTX.axes_auto_position){
+      Draw_Axes(CTX.axes, CTX.axes_tics, CTX.axes_format, CTX.axes_label, 
+		CTX.axes_position);
+    }
+    else if(Tree_Nbr(M->Vertices) || Tree_Nbr(M->Points)){
+      double bb[6] = { CTX.min[0], CTX.max[0],
+		       CTX.min[1], CTX.max[1],
+		       CTX.min[2], CTX.max[2] };
+      Draw_Axes(CTX.axes, CTX.axes_tics, CTX.axes_format, CTX.axes_label, bb);
+    }
+  }
   
   // draw the mesh
 
@@ -247,11 +263,6 @@ void Draw_Mesh(Mesh * M)
       glDisable((GLenum)(GL_CLIP_PLANE0 + i));
   }
 
-  // draw the big moving axes
-
-  if(CTX.axes)
-    Draw_Axes();
-
   // draw any plugin-specific stuff
   
   if(CTX.post.plugin_draw_function)
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 3db527e00edcea4ffb985b81ce818baf76628435..ac8ce9bc6a3604eb5def5c019e08d6d2b4c67bb7 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.96 2005-03-12 00:59:41 geuzaine Exp $
+// $Id: Post.cpp,v 1.97 2005-03-12 07:52:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -782,9 +782,10 @@ void Draw_Post(void)
       for(int i = 0; i < 6; i++)
 	glDisable((GLenum)(GL_CLIP_PLANE0 + i));
 
-      if(v->Grid && v->Type == DRAW_POST_3D){
-	if(!v->AutoPosition3D){
-	  Draw_3DGrid(v->Grid, v->NbTics, v->AxesFormat, v->AxesLabel, v->Position3D);
+      if(v->Axes && v->Type == DRAW_POST_3D){
+	glColor4ubv((GLubyte *) & CTX.color.fg);
+	if(!v->AxesAutoPosition){
+	  Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->AxesPosition);
 	}
 	else{
 	  int ok = 1;
@@ -795,7 +796,7 @@ void Draw_Post(void)
 	    }
 	  }
 	  if(ok)
-	    Draw_3DGrid(v->Grid, v->NbTics, v->AxesFormat, v->AxesLabel, v->TmpBBox);
+	    Draw_Axes(v->Axes, v->AxesTics, v->AxesFormat, v->AxesLabel, v->TmpBBox);
 	}
       }
       
diff --git a/Graphics/Scale.cpp b/Graphics/Scale.cpp
index 91fab76ac34f9df10064ead0fe0f7088256dc791..1d204df435058d82f52185d2642a401c6208df9e 100644
--- a/Graphics/Scale.cpp
+++ b/Graphics/Scale.cpp
@@ -1,4 +1,4 @@
-// $Id: Scale.cpp,v 1.58 2005-03-12 00:59:42 geuzaine Exp $
+// $Id: Scale.cpp,v 1.59 2005-03-12 07:52:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -327,11 +327,11 @@ void Draw_Scales(void)
   for(int i = 0; i < List_Nbr(todraw); i++) {
     Post_View *v = *(Post_View **) List_Pointer(todraw, i);
     
-    if(!v->AutoPosition2D) {
+    if(!v->AutoPosition) {
       draw_scale(v, 
-		 v->Position2D[0], 
-		 CTX.viewport[3] - v->Size2D[1] - v->Position2D[1], 
-		 v->Size2D[0], v->Size2D[1], 
+		 v->Position[0], 
+		 CTX.viewport[3] - v->Size[1] - v->Position[1], 
+		 v->Size[0], v->Size[1], 
 		 tic, CTX.post.horizontal_scales);
     }
     else{
diff --git a/benchmarks/misc/charts.geo b/benchmarks/misc/charts.geo
index 1b6415ffd2cd4fe9dca8da90aab45da735e3c3af..b86a56051420e4acee2a4e040732f313c34895e4 100644
--- a/benchmarks/misc/charts.geo
+++ b/benchmarks/misc/charts.geo
@@ -17,7 +17,7 @@ View "test" {
 
 View[PostProcessing.NbViews-1].Type=2;
 View[PostProcessing.NbViews-1].Format="%.3g";
-View[PostProcessing.NbViews-1].Grid=3;
+View[PostProcessing.NbViews-1].Axes=3;
 
 /*
 View "annote" {
diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi
index fd4c86990aa3200f58a685af0ced367792ecbab2..f6a5bf0a665d0fe675edb3f6b8723fd788ba10ff 100644
--- a/doc/texinfo/opt_general.texi
+++ b/doc/texinfo/opt_general.texi
@@ -1,4 +1,34 @@
 @ftable @code
+@item General.AxesFormatX
+Number format for X-axis (in standard C form)@*
+Default value: @code{"%.3g"}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesFormatY
+Number format for Y-axis (in standard C form)@*
+Default value: @code{"%.3g"}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesFormatZ
+Number format for Z-axis (in standard C form)@*
+Default value: @code{"%.3g"}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesLabelX
+X-axis label@*
+Default value: @code{""}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesLabelY
+Y-axis label@*
+Default value: @code{""}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesLabelZ
+Z-axis label@*
+Default value: @code{""}@*
+Saved in: @code{General.OptionsFileName}
+
 @item General.DefaultFileName
 Default project file name@*
 Default value: @code{"untitled.geo"}@*
@@ -70,13 +100,58 @@ Default value: @code{0.02}@*
 Saved in: @code{General.OptionsFileName}
 
 @item General.Axes
-Display the axes linked to the model@*
+Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid)@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesAutoPosition
+Position the axes automatically@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesMaxX
+Maximum X-axis coordinate@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesMaxY
+Maximum Y-axis coordinate@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesMaxZ
+Maximum Z-axis coordinate@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesMinX
+Minimum X-axis coordinate@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesMinY
+Minimum Y-axis coordinate@*
 Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
-@item General.AxesSize
-Size (in pixels) of moving axes@*
-Default value: @code{100}@*
+@item General.AxesMinZ
+Minimum Z-axis coordinate@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesTicsX
+Number of tics on the X-axis@*
+Default value: @code{5}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesTicsY
+Number of tics on the Y-axis@*
+Default value: @code{5}@*
+Saved in: @code{General.OptionsFileName}
+
+@item General.AxesTicsZ
+Number of tics on the Z-axis@*
+Default value: @code{5}@*
 Saved in: @code{General.OptionsFileName}
 
 @item General.Clip0
@@ -776,7 +851,7 @@ Saved in: @code{General.OptionsFileName}
 
 @item General.Color.Axes
 Axes color@*
-Default value: @code{@{255,255,0@}}@*
+Default value: @code{@{255,255,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item General.Color.SmallAxes
diff --git a/doc/texinfo/opt_view.texi b/doc/texinfo/opt_view.texi
index 04c953adce1f22eaee223cc738184836a0a3caa6..d1e0c4d9aadbf936d43a21b02bf676a1dba3c071 100644
--- a/doc/texinfo/opt_view.texi
+++ b/doc/texinfo/opt_view.texi
@@ -99,11 +99,61 @@ Position the scale or 2D graph automatically@*
 Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
-@item View.AutoPosition3D
-Position the 3D grid automatically@*
+@item View.Axes
+Axes (0=none, 1=simple axes, 2=box, 3=full grid, 4=open grid)@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesAutoPosition
+Position the axes automatically@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesMaxX
+Maximum X-axis coordinate@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesMaxY
+Maximum Y-axis coordinate@*
+Default value: @code{1}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesMaxZ
+Maximum Z-axis coordinate@*
 Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
+@item View.AxesMinX
+Minimum X-axis coordinate@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesMinY
+Minimum Y-axis coordinate@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesMinZ
+Minimum Z-axis coordinate@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesTicsX
+Number of tics on the X-axis@*
+Default value: @code{5}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesTicsY
+Number of tics on the Y-axis@*
+Default value: @code{5}@*
+Saved in: @code{General.OptionsFileName}
+
+@item View.AxesTicsZ
+Number of tics on the Z-axis@*
+Default value: @code{5}@*
+Saved in: @code{General.OptionsFileName}
+
 @item View.Boundary
 Draw the `N minus b'-dimensional boundary of the element (N=element dimension, b=option value)@*
 Default value: @code{0}@*
@@ -255,7 +305,7 @@ Default value: @code{-1}@*
 Saved in: @code{General.OptionsFileName}
 
 @item View.Grid
-Grid mode (0=none, 1=axes, 2=box, 3=full grid, 4=open grid)@*
+Grid mode (this option is deprecated: use View.Axes instead)@*
 Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
@@ -334,21 +384,6 @@ Number of intervals@*
 Default value: @code{15}@*
 Saved in: @code{General.OptionsFileName}
 
-@item View.NbTicsX
-Number of tics on the X-axis@*
-Default value: @code{5}@*
-Saved in: @code{General.OptionsFileName}
-
-@item View.NbTicsY
-Number of tics on the Y-axis@*
-Default value: @code{5}@*
-Saved in: @code{General.OptionsFileName}
-
-@item View.NbTicsZ
-Number of tics on the Z-axis@*
-Default value: @code{5}@*
-Saved in: @code{General.OptionsFileName}
-
 @item View.NbTimeStep
 Number of time steps in the view (do not change this!)@*
 Default value: @code{1}@*
@@ -384,36 +419,6 @@ Display points as solid color dots (0) or 3D spheres (1)@*
 Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
-@item View.PositionMaxX
-Maximum grid coordinate along the X-axis@*
-Default value: @code{1}@*
-Saved in: @code{-}
-
-@item View.PositionMaxY
-Maximum grid coordinate along the Y-axis@*
-Default value: @code{1}@*
-Saved in: @code{-}
-
-@item View.PositionMaxZ
-Maximum grid coordinate along the Z-axis@*
-Default value: @code{1}@*
-Saved in: @code{-}
-
-@item View.PositionMinX
-Minimum grid coordinate along the X-axis@*
-Default value: @code{0}@*
-Saved in: @code{-}
-
-@item View.PositionMinY
-Minimum grid coordinate along the Y-axis@*
-Default value: @code{0}@*
-Saved in: @code{-}
-
-@item View.PositionMinZ
-Minimum grid coordinate along the Z-axis@*
-Default value: @code{0}@*
-Saved in: @code{-}
-
 @item View.PositionX
 Horizontal position (in pixels) of the upper left corner of the scale or 2D graph@*
 Default value: @code{100}@*
diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi
index 7279d9b5b8e14d98e1ab0dfd6039456cdf0be525..4db8302ee1d78c323b69b4feed7beb7d5f4908df 100644
--- a/doc/texinfo/shortcuts.texi
+++ b/doc/texinfo/shortcuts.texi
@@ -87,7 +87,7 @@ Show visibility window
 @sp 1 @c ----------------------------------------------
 
 @item Alt+a
-Hide/show small axes 
+Loop through axes modes
 @item Alt+b
 Hide/show bounding boxes
 @item Alt+c
@@ -97,7 +97,7 @@ Change surface mesh display mode (solid/wireframe)
 @item Alt+f
 Change redraw mode (fast/full) 
 @item Alt+g
-Loop through grid modes for all post-processing views 
+Loop through grid modes for visible post-processing views 
 @item Alt+h
 Hide/show all post-processing views 
 @item Alt+i
@@ -115,7 +115,7 @@ Hide/show geometry points
 @item Alt+s
 Hide/show geometry surfaces
 @item Alt+t
-Loop through interval modes for all post-processing views 
+Loop through interval modes for visible post-processing views 
 @item Alt+v
 Hide/show geometry volumes
 @item Alt+w
@@ -130,7 +130,7 @@ Set Z view
 @sp 1 @c ----------------------------------------------
 
 @item Alt+Shift+a
-Hide/show moving axes 
+Hide/show small axes 
 @item Alt+Shift+l
 Hide/show surface mesh edges
 @item Alt+Shift+p
diff --git a/tutorial/t8.geo b/tutorial/t8.geo
index 077102b4259d1b326e2940b744f10f8511f0578b..d5b56ffd452299d84e88b577e5c2dc0004659263 100644
--- a/tutorial/t8.geo
+++ b/tutorial/t8.geo
@@ -59,7 +59,7 @@ View[v3].Type = 3;
 View[v3].RangeType = 2;
 View[v3].IntervalsType = 4 ;
 View[v3].ShowScale = 0;
-View[v3].Grid = 0;
+View[v3].Axes = 0;
 View[v3].CustomMin = View[v2].CustomMin;
 View[v3].CustomMax = View[v2].CustomMax;
 View[v3].AutoPosition = 0;
diff --git a/utils/solvers/c++/solver.cpp b/utils/solvers/c++/solver.cpp
index ed43ca276cd41fd312cb8fcb670ed3a2a99d77a0..ce5cb34a6d82394c7fe04c827832586afd402833 100644
--- a/utils/solvers/c++/solver.cpp
+++ b/utils/solvers/c++/solver.cpp
@@ -1,4 +1,4 @@
-// $Id: solver.cpp,v 1.5 2005-03-12 01:02:46 geuzaine Exp $
+// $Id: solver.cpp,v 1.6 2005-03-12 07:52:56 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
 	client.Error("Unable to open output file");
       else {
 	fprintf(file, "View.Type = 2;\n");
-	fprintf(file, "View.Grid = 3;\n");
+	fprintf(file, "View.Axes = 3;\n");
 	fprintf(file, "Delete View[0];\n");
 	fprintf(file, "View \"%s\"{\n", option);
 	for(int j = 0; j < 100; j++)