diff -uN gnuplot-current/src/axis.h.ORG gnuplot-current/src/axis.h
--- gnuplot-current/src/axis.h.ORG	Wed Sep 10 12:20:05 2008
+++ gnuplot-current/src/axis.h	Wed Sep 17 18:21:07 2008
@@ -688,4 +688,17 @@
     || 1 == (plot)->lp_properties.use_palette)
 int set_cbminmax __PROTO((void));
 
+/* shige: moved from axis.c */
+#ifdef USE_CTRL_TIMELEVEL
+typedef enum e_timelevel {
+    TIMELEVEL_SECONDS = 1, TIMELEVEL_MINUTES, TIMELEVEL_HOURS,
+    TIMELEVEL_DAYS, TIMELEVEL_WEEKS, TIMELEVEL_MONTHS,
+    TIMELEVEL_YEARS
+    ,
+    /* shige: add two */
+    TIMELEVEL_NONE = -1, /* unuse timelevel */
+    TIMELEVEL_AUTO = 0 /* use auto setting */
+} t_timelevel;
+#endif
+
 #endif /* GNUPLOT_AXIS_H */
diff -uN gnuplot-current/src/axis.c.ORG gnuplot-current/src/axis.c
--- gnuplot-current/src/axis.c.ORG	Wed Sep 10 12:20:05 2008
+++ gnuplot-current/src/axis.c	Wed Sep 17 18:45:39 2008
@@ -83,12 +83,17 @@
  * self-explanatory */
 /* The unit the tics of a given time/date axis are to interpreted in */
 /* HBB 20040318: start at one, to avoid undershoot */
+/* shige: move to axis.h */
+#ifndef USE_CTRL_TIMELEVEL
 typedef enum e_timelevel {
     TIMELEVEL_SECONDS = 1, TIMELEVEL_MINUTES, TIMELEVEL_HOURS,
     TIMELEVEL_DAYS, TIMELEVEL_WEEKS, TIMELEVEL_MONTHS,
     TIMELEVEL_YEARS
 } t_timelevel;
 static t_timelevel timelevel[AXIS_ARRAY_SIZE];
+#else
+t_timelevel timelevel[AXIS_ARRAY_SIZE];
+#endif
 
 /* The <increment> given in a 'set {x|y|...}tics', or an automatically
  * generated one, if automatic tic placement is active */
@@ -670,6 +675,10 @@
 {
     int guide12 = guide * 3 / 5; /* --> 12 for default of 20 */
 
+/* shige */
+#ifdef USE_CTRL_TIMELEVEL
+    if(timelevel[axis] != TIMELEVEL_AUTO) return tic;
+#endif
     timelevel[axis] = TIMELEVEL_SECONDS;
     if (tic > 5) {
 	/* turn tic into units of minutes */
@@ -794,7 +803,13 @@
      * leading to strange misbehaviours of minor tics on time axes.
      * We used to call quantize_time_tics, but that also caused strangeness.
      */
+/* shige */
+#ifdef USE_CTRL_TIMELEVEL
+    if (this->is_timedata && ticdef->type == TIC_SERIES 
+	&& timelevel[axis] == TIMELEVEL_AUTO) {
+#else
     if (this->is_timedata && ticdef->type == TIC_SERIES) {
+#endif
 	if      (tic >= 365*24*60*60.) timelevel[axis] = TIMELEVEL_YEARS;
 	else if (tic >=  28*24*60*60.) timelevel[axis] = TIMELEVEL_MONTHS;
 	else if (tic >=   7*24*60*60.) timelevel[axis] = TIMELEVEL_WEEKS;
@@ -1165,7 +1180,12 @@
 {
     struct tm tm;
 
+/* shige */
+#ifdef USE_CTRL_TIMELEVEL
+    if (level == TIMELEVEL_NONE || level <= TIMELEVEL_SECONDS) {
+#else
     if (level <= TIMELEVEL_SECONDS) {
+#endif
 	return (ticplace);
     }
     ggmtime(&tm, ticplace);
diff -uN gnuplot-current/src/set.c.ORG gnuplot-current/src/set.c
--- gnuplot-current/src/set.c.ORG	Wed Sep 10 12:20:08 2008
+++ gnuplot-current/src/set.c	Wed Sep 17 18:45:51 2008
@@ -4372,6 +4372,41 @@
 static void
 set_timedata(AXIS_INDEX axis)
 {
+/* shige */
+#ifdef USE_CTRL_TIMELEVEL
+    extern t_timelevel timelevel[];
+    axis_array[axis].is_timedata = FALSE;
+
+    c_token++;
+    while (!END_OF_COMMAND) {
+	if (almost_equals(c_token,"t$ime")) {
+	    axis_array[axis].is_timedata = TRUE;
+	} else if (equals(c_token,"tmlevel")) {
+	    c_token++;
+	    if (almost_equals(c_token,"a$uto")) 
+	      timelevel[axis] = TIMELEVEL_AUTO;
+	    else if (almost_equals(c_token,"s$econd")) 
+	      timelevel[axis] = TIMELEVEL_SECONDS;
+	    else if (almost_equals(c_token,"mi$nute")) 
+	      timelevel[axis] = TIMELEVEL_MINUTES;
+	    else if (almost_equals(c_token,"h$our")) 
+	      timelevel[axis] = TIMELEVEL_HOURS;
+	    else if (almost_equals(c_token,"d$ay")) 
+	      timelevel[axis] = TIMELEVEL_DAYS;
+	    else if (almost_equals(c_token,"w$eek")) 
+	      timelevel[axis] = TIMELEVEL_WEEKS;
+	    else if (almost_equals(c_token,"mo$nth")) 
+	      timelevel[axis] = TIMELEVEL_MONTHS;
+	    else if (almost_equals(c_token,"year")) 
+	      timelevel[axis] = TIMELEVEL_YEARS;
+	    else if (almost_equals(c_token,"no$ne")) 
+	      timelevel[axis] = TIMELEVEL_NONE;
+	    else 
+	      timelevel[axis] = TIMELEVEL_AUTO;
+	}
+	c_token++;
+    }
+#else
     c_token++;
     if(END_OF_COMMAND) {
 	axis_array[axis].is_timedata = FALSE;
@@ -4379,6 +4414,7 @@
 	if ((axis_array[axis].is_timedata = almost_equals(c_token,"t$ime")))
 	    c_token++;
 }
+#endif
 }
 
 
