diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -98,3 +98,6 @@
 
 0.1.7.1:
 		* small bug fix when setting ticks
+
+0.1.8:
+		* added `TickFormat` data type
diff --git a/THANKS b/THANKS
--- a/THANKS
+++ b/THANKS
@@ -1,2 +1,3 @@
  * Nicolas Dudebout for linlog and loglin in Simple.hs
  * uriba for a small bug fix when setting ticks
+ * buecking added the TickFormat data type and resulting code
diff --git a/lib/Graphics/Rendering/Plot/Defaults.hs b/lib/Graphics/Rendering/Plot/Defaults.hs
--- a/lib/Graphics/Rendering/Plot/Defaults.hs
+++ b/lib/Graphics/Rendering/Plot/Defaults.hs
@@ -166,7 +166,7 @@
 defaultMajorTicks = Just $ Ticks NoLine (TickNumber 5)
 
 defaultTickFormat :: TickFormat
-defaultTickFormat = ""
+defaultTickFormat = DefaultTickFormat
 
 defaultAxis :: AxisType -> AxisPosn -> AxisData
 defaultAxis at axp = Axis at axp 
diff --git a/lib/Graphics/Rendering/Plot/Figure.hs b/lib/Graphics/Rendering/Plot/Figure.hs
--- a/lib/Graphics/Rendering/Plot/Figure.hs
+++ b/lib/Graphics/Rendering/Plot/Figure.hs
@@ -97,6 +97,7 @@
                                       , withLegendFormat
                                       -- ** Formatting
                                       , Tick(..), TickValues(..), GridLines
+                                      , TickFormat(..)
                                       , setTicks
                                       , setGridlines
                                       , setTickLabelFormat
diff --git a/lib/Graphics/Rendering/Plot/Figure/Plot.hs b/lib/Graphics/Rendering/Plot/Figure/Plot.hs
--- a/lib/Graphics/Rendering/Plot/Figure/Plot.hs
+++ b/lib/Graphics/Rendering/Plot/Figure/Plot.hs
@@ -66,6 +66,7 @@
                                            , withLegendFormat
                                             -- ** Formatting
                                             , Tick(..), TickValues(..), GridLines
+                                           , TickFormat(..)
                                            , AX.setTicks
                                            , AX.setGridlines
                                            , AX.setTickLabelFormat
diff --git a/lib/Graphics/Rendering/Plot/Figure/Plot/Axis.hs b/lib/Graphics/Rendering/Plot/Figure/Plot/Axis.hs
--- a/lib/Graphics/Rendering/Plot/Figure/Plot/Axis.hs
+++ b/lib/Graphics/Rendering/Plot/Figure/Plot/Axis.hs
@@ -16,6 +16,7 @@
                                                  Axis
                                                 , AxisType(..),AxisSide(..),AxisPosn(..)
                                                 , Tick(..), TickValues(..), GridLines
+                                                , TickFormat(..)
                                                 , setTicks
                                                 , setGridlines
                                                 , setTickLabelFormat
@@ -89,7 +90,7 @@
 setTicks Minor (TickNumber 0) = modify $ \s -> 
   changeMinorTicks (const Nothing) s
 setTicks Minor ts             = modify $ \s -> 
-  changeMajorTicks (setTickValues ts) s
+  changeMinorTicks (setTickValues ts) s
 setTicks Major (TickNumber 0) = modify $ \s -> 
   changeMajorTicks (const Nothing) s
 setTicks Major ts             = modify $ \s -> 
@@ -100,8 +101,8 @@
 setGridlines Minor gl = modify $ \s -> changeMinorTicks (setTickGridlines (if gl then defaultGridLine else NoLine)) s
 setGridlines Major gl = modify $ \s -> changeMajorTicks (setTickGridlines (if gl then defaultGridLine else NoLine)) s
 
--- | printf format that takes one argument, the tick value
-setTickLabelFormat :: String -> Axis ()
+-- | set the tick label format
+setTickLabelFormat :: TickFormat -> Axis ()
 setTickLabelFormat tf = modify $ \s -> changeTickFormat tf s
 
 -- | a list of data labels
diff --git a/lib/Graphics/Rendering/Plot/Render/Plot/Axis.hs b/lib/Graphics/Rendering/Plot/Render/Plot/Axis.hs
--- a/lib/Graphics/Rendering/Plot/Render/Plot/Axis.hs
+++ b/lib/Graphics/Rendering/Plot/Render/Plot/Axis.hs
@@ -476,7 +476,7 @@
                       (Side _)  -> True
                       (Value _) -> False
        when (t == Major && majlab) $ do
-            let s = if sc == Log then formatTick "10e%.1g" (logBase 10 v) else formatTick tf v
+            let s = if sc == Log then formatTick (Printf "10e%.1g") (logBase 10 v) else formatTick tf v
             let s' = case dl of
                        Nothing -> BareText s
                        Just d  -> d
@@ -510,13 +510,15 @@
 
 -----------------------------------------------------------------------------
 
-formatTick :: String -> Double -> String
-formatTick tf p
-    | tf /= ""      = Printf.printf tf p 
-    | p == 0.0      = "0"
-    | abs p > 1000  = Printf.printf "%1.1e" p
-    | abs p < 0.001 = Printf.printf "%.3e" p
-    | otherwise     = Printf.printf "%.2f" p
--- %g uses "whichever of %f, %e is smaller
+formatTick :: TickFormat -> Double -> String
+formatTick tf p = case tf of
+    DefaultTickFormat
+        | p == 0.0      -> "0"
+        | abs p > 1000  -> Printf.printf "%1.1e" p
+        | abs p < 0.001 -> Printf.printf "%.3e" p
+        | otherwise     -> Printf.printf "%.2f" p
+        -- %g uses "whichever of %f, %e is smaller
+    Printf s -> Printf.printf s p
+    FormatFunction f -> f p
 
 -----------------------------------------------------------------------------
diff --git a/lib/Graphics/Rendering/Plot/Types.hs b/lib/Graphics/Rendering/Plot/Types.hs
--- a/lib/Graphics/Rendering/Plot/Types.hs
+++ b/lib/Graphics/Rendering/Plot/Types.hs
@@ -196,7 +196,10 @@
 setTickValues tv (Just (Ticks gl _)) = Just $ Ticks gl tv
 setTickValues tv Nothing             = Just $ Ticks NoLine tv
 
-type TickFormat = String
+data TickFormat
+    = DefaultTickFormat
+    | Printf String
+    | FormatFunction (Double -> String)
 
 data AxisData = Axis {
       _axis_type     :: AxisType
diff --git a/plot.cabal b/plot.cabal
--- a/plot.cabal
+++ b/plot.cabal
@@ -1,5 +1,5 @@
 Name:                plot
-Version:             0.1.7.1
+Version:             0.1.8
 License:             BSD3
 License-file:        LICENSE
 Copyright:           (c) A.V.H. McPhail 2010, 2012
