diff --git a/Chart.cabal b/Chart.cabal
--- a/Chart.cabal
+++ b/Chart.cabal
@@ -1,5 +1,5 @@
 Name: Chart
-Version: 0.14
+Version: 0.15
 License: BSD3
 License-file: LICENSE
 Copyright: Tim Docker, 2006-2010
@@ -34,10 +34,6 @@
 flag splitbase
   description: Choose the new smaller, split-up base package.
 
-flag gtk
-  description: If gtk2hs is available, add extra API functions to use it.
-  default: True
-
 library
   if flag(splitbase)
     Build-depends: base >= 3 && < 5, old-locale, time, mtl, array
@@ -46,11 +42,6 @@
   Build-depends: cairo >= 0.9.11, time, mtl, array, data-accessor == 0.2.*, 
                  data-accessor-template >= 0.2.1.1 && < 0.3, colour >= 2.2.1
 
-  if flag(gtk)
-    build-depends: gtk >= 0.9.11
-    exposed-modules: Graphics.Rendering.Chart.Gtk
-    cpp-options: -DHAVE_GTK=1
-
   Exposed-modules:
         Graphics.Rendering.Chart,
         Graphics.Rendering.Chart.Types,
@@ -65,6 +56,7 @@
         Graphics.Rendering.Chart.Layout,
         Graphics.Rendering.Chart.Legend,
         Graphics.Rendering.Chart.Simple,
+        Graphics.Rendering.Chart.Simple.Internal,
         Graphics.Rendering.Chart.Grid,
         Graphics.Rendering.Chart.Plot,
         Graphics.Rendering.Chart.Plot.Types,
diff --git a/Graphics/Rendering/Chart/Axis/Floating.hs b/Graphics/Rendering/Chart/Axis/Floating.hs
--- a/Graphics/Rendering/Chart/Axis/Floating.hs
+++ b/Graphics/Rendering/Chart/Axis/Floating.hs
@@ -31,6 +31,7 @@
 
 import Data.List(minimumBy)
 import Data.Ord (comparing)
+import Numeric (showFFloat)
 
 import Data.Accessor.Template
 import Graphics.Rendering.Chart.Types
@@ -67,9 +68,10 @@
     fromValue d          = LogValue (exp d)
     autoAxis             = autoScaledLogAxis defaultLogAxis
 
-showD x = case reverse $ show x of
+showD :: (RealFloat d) => d -> String
+showD x = case reverse $ showFFloat Nothing x "" of
             '0':'.':r -> reverse r
-            _         -> show x
+            r         -> reverse r
 
 data LinearAxisParams a = LinearAxisParams {
     -- | The function used to show the axes labels.
@@ -82,7 +84,7 @@
     la_nTicks_  :: Int
 }
 
-defaultLinearAxis :: (Show a) => LinearAxisParams a
+defaultLinearAxis :: (Show a, RealFloat a) => LinearAxisParams a
 defaultLinearAxis = LinearAxisParams {
     la_labelf_    = showD,
     la_nLabels_   = 5,
@@ -98,7 +100,8 @@
     ps        = filter isValidNumber ps0
     (min,max) = (minimum ps,maximum ps)
     range []  = (0,1)
-    range _   | min == max = (min-1,min+1)
+    range _   | min == max = if min==0 then (-1,1) else
+                             let d = abs (min * 0.01) in (min-d,max+d)
               | otherwise  = (min,max)
     labelvs   = map fromRational $ steps (fromIntegral (la_nLabels_ lap)) r
     tickvs    = map fromRational $ steps (fromIntegral (la_nTicks_ lap))
@@ -138,7 +141,7 @@
 
 ----------------------------------------------------------------------
 
-defaultLogAxis :: Show a => LogAxisParams a
+defaultLogAxis :: (Show a, RealFloat a) => LogAxisParams a
 defaultLogAxis = LogAxisParams {
     loga_labelf_ = showD
 }
diff --git a/Graphics/Rendering/Chart/Axis/Types.hs b/Graphics/Rendering/Chart/Axis/Types.hs
--- a/Graphics/Rendering/Chart/Axis/Types.hs
+++ b/Graphics/Rendering/Chart/Axis/Types.hs
@@ -34,10 +34,12 @@
     invLinMap,
 
     axisGridAtTicks,
+    axisGridAtBigTicks,
     axisGridAtLabels,
     axisGridHide,
     axisTicksHide,
     axisLabelsHide,
+    axisLabelsOverride,
 
     axis_viewport,
     axis_tropweiv,
@@ -55,6 +57,7 @@
 import qualified Graphics.Rendering.Cairo as C
 import Data.Time
 import Data.Fixed
+import Data.Maybe
 import System.Locale (defaultTimeLocale)
 import Control.Monad
 import Data.List(sort,intersperse)
@@ -130,16 +133,23 @@
   }
 
 -- | Modifier to remove grid lines from an axis
-axisGridHide        :: AxisData x -> AxisData x
-axisGridHide ad      = ad{ axis_grid_   = [] }
+axisGridHide         :: AxisData x -> AxisData x
+axisGridHide ad       = ad{ axis_grid_ = [] }
 
 -- | Modifier to position grid lines to line up with the ticks
-axisGridAtTicks     :: AxisData x -> AxisData x
-axisGridAtTicks ad   = ad{ axis_grid_   = map fst (axis_ticks_ ad) }
+axisGridAtTicks      :: AxisData x -> AxisData x
+axisGridAtTicks ad    = ad{ axis_grid_ = map fst (axis_ticks_ ad) }
 
+-- | Modifier to position grid lines to line up with only the major ticks
+axisGridAtBigTicks   :: AxisData x -> AxisData x
+axisGridAtBigTicks ad = ad{ axis_grid_ =
+                            map fst $
+                            filter ((> minimum (map (abs.snd) (axis_ticks_ ad))).snd) $
+                            axis_ticks_ ad }
+
 -- | Modifier to position grid lines to line up with the labels
-axisGridAtLabels    :: AxisData x -> AxisData x
-axisGridAtLabels ad  = ad{ axis_grid_   = map fst vs }
+axisGridAtLabels     :: AxisData x -> AxisData x
+axisGridAtLabels ad   = ad{ axis_grid_ = map fst vs }
   where
     vs = case axis_labels_ ad of
         [] -> []
@@ -153,6 +163,10 @@
 axisLabelsHide      :: AxisData x -> AxisData x
 axisLabelsHide ad    = ad{ axis_labels_ = []}
 
+-- | Modifier to change labels on an axis
+axisLabelsOverride  :: [(x,String)] -> AxisData x -> AxisData x
+axisLabelsOverride o ad = ad{ axis_labels_ = [o] }
+
 minsizeAxis :: AxisT x -> CRender RectSize
 minsizeAxis (AxisT at as rev ad) = do
     labelSizes <- preserveCState $ do
@@ -235,7 +249,8 @@
 
    avoidOverlaps labels = do
        rects <- mapM labelDrawRect labels
-       return $ map snd . head . filter (noOverlaps . map fst) $ map (\n -> eachNth n rects) [0 .. length rects]
+       return $ map snd . head . filter (noOverlaps . map fst)
+              $ map (\n -> eachNth n rects) [0 .. length rects]
 
    labelDrawRect (value,s) = do
        let pt = axisPoint value `pvadd` (awayFromAxis ag)
diff --git a/Graphics/Rendering/Chart/Gtk.hs b/Graphics/Rendering/Chart/Gtk.hs
deleted file mode 100644
--- a/Graphics/Rendering/Chart/Gtk.hs
+++ /dev/null
@@ -1,81 +0,0 @@
------------------------------------------------------------------------------
--- |
--- Module      :  Graphics.Rendering.Chart.Gtk
--- Copyright   :  (c) Tim Docker 2006
--- License     :  BSD-style (see chart/COPYRIGHT)
-
-module Graphics.Rendering.Chart.Gtk(
-    renderableToWindow,
-    createRenderableWindow,
-    updateCanvas
-    ) where
-
-import qualified Graphics.UI.Gtk as G
-import qualified Graphics.UI.Gtk.Gdk.Events as GE
-import qualified Graphics.Rendering.Cairo as C
-import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Renderable
-import Graphics.Rendering.Chart.Types
-import Data.List (isPrefixOf)
-import Data.IORef
-import Control.Monad(when)
-import System.IO.Unsafe(unsafePerformIO)
-
--- do action m for any keypress (except meta keys)
-anyKey :: (Monad m) => m a -> GE.Event -> m Bool
-anyKey m (GE.Key {GE.eventKeyName=key})
-    | any (`isPrefixOf` key) ignores = return True
-    | otherwise                      = m >> return True
-  where ignores = ["Shift","Control","Alt",
-                   "Super","Meta","Hyper"]
-
--- Yuck. But we really want the convenience function
--- renderableToWindow as to be callable without requiring
--- initGUI to be called first. But newer versions of
--- gtk insist that initGUI is only called once
-guiInitVar :: IORef Bool
-{-# NOINLINE guiInitVar #-}
-guiInitVar = unsafePerformIO (newIORef False)
-
-initGuiOnce :: IO ()
-initGuiOnce = do
-    v <- readIORef guiInitVar
-    when (not v) $ do
-        -- G.initGUI
-        G.unsafeInitGUIForThreadedRTS
-        writeIORef guiInitVar True
-
--- | Display a renderable in a gtk window.
---
--- Note that this is a convenience function that initialises GTK on
--- it's first call, but not subsequent calls. Hence it's 
--- unlikely to be compatible with other code using gtk. In 
--- that case use createRenderableWindow.
-renderableToWindow :: Renderable a -> Int -> Int -> IO ()
-renderableToWindow chart windowWidth windowHeight = do
-    initGuiOnce
-    window <- createRenderableWindow chart windowWidth windowHeight
-    -- press any key to exit the loop
-    G.onKeyPress window $ anyKey (G.widgetDestroy window)
-    G.onDestroy window G.mainQuit
-    G.widgetShowAll window
-    G.mainGUI
-
--- | Create a new GTK window displaying a renderable.
-createRenderableWindow :: Renderable a -> Int -> Int -> IO G.Window
-createRenderableWindow chart windowWidth windowHeight = do
-    window <- G.windowNew
-    canvas <- G.drawingAreaNew
-    G.widgetSetSizeRequest window windowWidth windowHeight
-    G.onExpose canvas $ const (updateCanvas chart canvas)
-    G.set window [G.containerChild G.:= canvas]
-    return window
-
-
-updateCanvas :: Renderable a -> G.DrawingArea  -> IO Bool
-updateCanvas chart canvas = do
-    win <- G.widgetGetDrawWindow canvas
-    (width, height) <- G.widgetGetSize canvas
-    let sz = (fromIntegral width,fromIntegral height)
-    G.renderWithDrawable win $ runCRender (render chart sz) bitmapEnv
-    return True
diff --git a/Graphics/Rendering/Chart/Layout.hs b/Graphics/Rendering/Chart/Layout.hs
--- a/Graphics/Rendering/Chart/Layout.hs
+++ b/Graphics/Rendering/Chart/Layout.hs
@@ -140,7 +140,10 @@
 
 data Layout1Pick x y = L1P_Legend String
                      | L1P_Title String
-                     | L1P_AxisTitle String
+                     | L1P_BottomAxisTitle String
+                     | L1P_TopAxisTitle String
+                     | L1P_LeftAxisTitle String
+                     | L1P_RightAxisTitle String
                      | L1P_PlotArea x y y
                      | L1P_BottomAxis x
                      | L1P_TopAxis x
@@ -266,16 +269,16 @@
          , besideN [er,     er,    btitle, er,    er       ]
          ]
 
-    ttitle = atitle HTA_Centre VTA_Bottom   0 layout1_top_axis_
-    btitle = atitle HTA_Centre VTA_Top      0 layout1_bottom_axis_
-    ltitle = atitle HTA_Right  VTA_Centre 270 layout1_left_axis_
-    rtitle = atitle HTA_Left   VTA_Centre 270 layout1_right_axis_
+    ttitle = atitle HTA_Centre VTA_Bottom   0 layout1_top_axis_    L1P_TopAxisTitle
+    btitle = atitle HTA_Centre VTA_Top      0 layout1_bottom_axis_ L1P_BottomAxisTitle
+    ltitle = atitle HTA_Right  VTA_Centre 270 layout1_left_axis_   L1P_LeftAxisTitle
+    rtitle = atitle HTA_Left   VTA_Centre 270 layout1_right_axis_  L1P_RightAxisTitle
 
     er = tval $ emptyRenderable
 
-    atitle ha va rot af = if ttext == "" then er
-                          else tval $ mapPickFn L1P_AxisTitle
-                                    $ rlabel tstyle ha va rot ttext
+    atitle ha va rot af pf = if ttext == "" then er
+                             else tval $ mapPickFn pf
+                                       $ rlabel tstyle ha va rot ttext
       where
         tstyle = laxis_title_style_ (af l)
         ttext  = laxis_title_       (af l)
@@ -339,15 +342,15 @@
 	  in plot_render_ p pmfn
     rPlot1 _ _ _ = return ()
 
-    pickfn (Point x y) = Just (L1P_PlotArea xv yv1 yv2)
+    pickfn (Point x y) = case (lAxis,rAxis) of
+            (Just at,Nothing)   -> Just $ L1P_PlotArea xv (mapy at y)  (mapy at y)
+            (Nothing,Just at)   -> Just $ L1P_PlotArea xv (mapy at y)  (mapy at y)
+            (Just at1,Just at2) -> Just $ L1P_PlotArea xv (mapy at1 y) (mapy at2 y)
+            (Nothing,Nothing)   -> Nothing
       where
         xv = case (bAxis,tAxis) of
             (Just at,_) -> mapx at x
             (_,Just at) -> mapx at x
-        (yv1,yv2) = case (lAxis,rAxis) of
-            (Just at,Nothing) -> (mapy at y,mapy at y)
-            (Nothing,Just at) -> (mapy at y,mapy at y)
-            (Just at1,Just at2) -> (mapy at1 y,mapy at2 y)
         mapx (AxisT _ _ rev ad) x = axis_tropweiv_ ad (reverse rev xr) x
         mapy (AxisT _ _ rev ad) y = axis_tropweiv_ ad (reverse rev yr) y
 
diff --git a/Graphics/Rendering/Chart/Renderable.hs b/Graphics/Rendering/Chart/Renderable.hs
--- a/Graphics/Rendering/Chart/Renderable.hs
+++ b/Graphics/Rendering/Chart/Renderable.hs
@@ -31,6 +31,7 @@
     spacer,
     spacer1,
     setPickFn,
+    mapMaybePickFn,
     mapPickFn,
     nullPickFn,
 
@@ -95,10 +96,14 @@
 setPickFn :: PickFn b -> Renderable a -> Renderable b
 setPickFn pickfn r = r{ render  = \sz -> do { render r sz; return pickfn; } }
 
+-- | Map a function over the result of a renderable's pickfunction, keeping only 'Just' results.
+mapMaybePickFn :: (a -> Maybe b) -> Renderable a -> Renderable b
+mapMaybePickFn f r = r{ render = \sz -> do pf <- render r sz
+                                           return (join . fmap f . pf) }
+
 -- | Map a function over result of a renderable's pickfunction.
 mapPickFn :: (a -> b) -> Renderable a -> Renderable b
-mapPickFn f r = r{ render  = \sz -> do pf <- render r sz
-                                       return (fmap f . pf) }
+mapPickFn f = mapMaybePickFn (Just . f)
 
 -- | Add some spacing at the edges of a renderable.
 addMargins :: (Double,Double,Double,Double) -- ^ The spacing to be added.
diff --git a/Graphics/Rendering/Chart/Simple.hs b/Graphics/Rendering/Chart/Simple.hs
--- a/Graphics/Rendering/Chart/Simple.hs
+++ b/Graphics/Rendering/Chart/Simple.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Graphics.Rendering.Chart.Simple
@@ -12,8 +11,7 @@
 -- four plotting functions, which differ only in their output.  One
 -- produces a "Layout1" that you can customize using other
 -- Graphics.Rendering.Chart functions.  The other three produce their
--- output directly.  All three accept the same input (except for the
--- filename required by plotPDF and plotPS), and produce the same plots.
+-- output directly.  All three accept the same input and produce the same plots.
 --
 -- The plot functions accept a variable number of arguments.  You must
 -- provide a [Double] which defines the points on the x axis, which must
@@ -23,313 +21,13 @@
 --
 -- Examples:
 --
--- > renderableToWindow (toRenderable $ plotLayout $
--- >                     plot [0,0.1..10] sin "sin(x)") 640 480
---
--- > plotWindow [0,1,3,4,8] [12,15,1,5,8] "o" "points"
---
 -- > plotPDF "foo.pdf" [0,0.1..10] sin "- " cos ". " cos "o"
 --
 -- > plotPS "foo.ps" [0,0.1..10] (sin . exp) "- " (sin . exp) "o-"
 -----------------------------------------------------------------------------
 module Graphics.Rendering.Chart.Simple( plot, PlotKind(..), xcoords,
-#if HAVE_GTK
-                                        plotWindow,
-#endif
                                         plotPDF, plotPS,
                                         plotLayout, plotPNG, Layout1DDD
                                       ) where
 
-import Data.Maybe ( catMaybes )
-import Data.Colour
-import Data.Colour.Names
-
-import Graphics.Rendering.Chart
-#if HAVE_GTK
-import Graphics.Rendering.Chart.Gtk
-#endif
-
-styleColor :: Int -> AlphaColour Double
-styleColor ind = colorSequence !! ind
-    where colorSequence = cycle $ map opaque [ blue, red, green, yellow
-                                             , cyan, magenta, black ]
-
-styleSymbol :: Int -> PlotKind
-styleSymbol ind = symbolSequence !! ind
-    where symbolSequence = cycle [ Ex, HollowCircle, Square, Diamond
-                                 , Triangle, DownTriangle, Plus, Star
-                                 , FilledCircle ]
-
--- When defaultLayout1 has been generalized, change this signature to 
--- [InternalPlot x y] -> Layout1 x y z
-iplot :: [InternalPlot Double Double] -> Layout1 Double Double
-iplot foobar = defaultLayout1 {
-        layout1_plots_ = concat $ zipWith toplot (ip foobar) [0..]
-    }
-  where
-    ip (xs@(IPX _ _):xyss) = map (\ys -> (xs,ys)) yss ++ ip rest
-                where yss  = takeWhile isIPY xyss
-                      rest = dropWhile isIPY xyss
-    ip (_:xyss) = ip xyss
-    ip   []     = []
-    isIPY (IPY _ _) = True
-    isIPY _         = False
-    toplot (IPX xs _, IPY ys yks) ind = map Left plots
-      where
-        vs = zip xs ys
-        plots = case catMaybes $ map plotas yks of
-                    [] -> [ toPlot $ defaultPlotLines
-                           { plot_lines_title_  = name yks,
-                             plot_lines_values_ = [vs],
-                             plot_lines_style_  = solidLine 1 (styleColor ind)
-                           } ]
-                    xs -> xs
-        plotas Solid = Just $ toPlot $ defaultPlotLines
-                         { plot_lines_title_  = name yks,
-                           plot_lines_values_ = [vs],
-                           plot_lines_style_  = solidLine 1 (styleColor ind) }
-        plotas Dashed = Just $ toPlot $ defaultPlotLines
-                         { plot_lines_title_  = name yks,
-                           plot_lines_values_ = [vs],
-                           plot_lines_style_  = dashedLine 1 [10,10]
-                                                           (styleColor ind) }
-        plotas Dotted = Just $ toPlot $ defaultPlotLines
-                         { plot_lines_title_  = name yks,
-                           plot_lines_values_ = [vs],
-                           plot_lines_style_  = dashedLine 1 [1,11]
-                                                           (styleColor ind) }
-        plotas FilledCircle = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = filledCircles 4
-                                                           (styleColor ind) }
-        plotas HollowCircle = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = hollowCircles 5 1
-                                                           (styleColor ind) }
-        plotas Triangle = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = hollowPolygon 7 1 3 False
-                                                           (styleColor ind) }
-        plotas DownTriangle = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = hollowPolygon 7 1 3 True
-                                                           (styleColor ind) }
-        plotas Square = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = hollowPolygon 7 1 4 False
-                                                           (styleColor ind) }
-        plotas Diamond = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = hollowPolygon 7 1 4 True
-                                                           (styleColor ind) }
-        plotas Plus = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = plusses 7 1 (styleColor ind) }
-        plotas Ex = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = exes 7 1 (styleColor ind) }
-        plotas Star = Just $ toPlot $ defaultPlotPoints
-                         { plot_points_title_  = name yks,
-                           plot_points_values_ = vs,
-                           plot_points_style_  = stars 7 1 (styleColor ind) }
-        plotas Symbols = plotas (styleSymbol ind)
-        plotas _ = Nothing
-
-name :: [PlotKind] -> String
-name (Name s:_) = s
-name (_:ks)     = name ks
-name []         = ""
-
-str2k :: String -> [PlotKind]
-str2k ""        = []
-str2k ". "      = [Dotted]
-str2k s@('?':_) = str2khelper s Symbols
-str2k s@('@':_) = str2khelper s FilledCircle
-str2k s@('#':_) = str2khelper s Square
-str2k s@('v':_) = str2khelper s DownTriangle
-str2k s@('^':_) = str2khelper s Triangle
-str2k s@('o':_) = str2khelper s HollowCircle
-str2k s@('+':_) = str2khelper s Plus
-str2k s@('x':_) = str2khelper s Ex
-str2k s@('*':_) = str2khelper s Star
-str2k s@('.':_) = str2khelper s LittleDot
-str2k "- "      = [Dashed]
-str2k "-"       = [Solid]
-str2k n         = [Name n]
-
-str2khelper :: String -> PlotKind -> [PlotKind]
-str2khelper s@(_:r) x = case str2k r of
-                          []       -> [x]
-                          [Name _] -> [Name s]
-                          xs       -> x:xs
-
--- | Type to define a few simple properties of each plot.
-data PlotKind = Name String | FilledCircle | HollowCircle
-              | Triangle | DownTriangle | Square | Diamond
-              | Plus | Ex | Star | Symbols
-              | LittleDot | Dashed | Dotted | Solid
-              deriving ( Eq, Show, Ord )
-data InternalPlot x y = IPY [y] [PlotKind] | IPX [x] [PlotKind]
-
-newtype Layout1DDD = Layout1DDD { plotLayout :: Layout1 Double Double }
-instance ToRenderable Layout1DDD where
- toRenderable = toRenderable . plotLayout
-
-uplot :: [UPlot] -> Layout1DDD
-uplot us = Layout1DDD $ iplot $ nameDoubles $ evalfuncs us
-  where
-    nameDoubles :: [UPlot] -> [InternalPlot Double Double]
-    nameDoubles (X xs: uus)      = case grabName uus of
-                                   (ks,uus') -> IPX (filter isValidNumber xs) ks
-                                                : nameDoubles uus'
-    nameDoubles (UDoubles xs:uus)= case grabName uus of
-                                   (ks,uus') -> IPY (filter isValidNumber xs) ks
-                                                : nameDoubles uus'
-    nameDoubles (_:uus)          = nameDoubles uus
-    nameDoubles []               = []
-    evalfuncs :: [UPlot] -> [UPlot]
-    evalfuncs (UDoubles xs:uus) = X xs : map ef (takeWhile (not.isX) uus)
-                                  ++ evalfuncs (dropWhile (not.isX) uus)
-        where ef (UFunction f) = UDoubles (map f xs)
-              ef u             = u
-    evalfuncs (X xs:uus) = X xs : map ef (takeWhile (not.isX) uus)
-                           ++ evalfuncs (dropWhile (not.isX) uus)
-        where ef (UFunction f) = UDoubles (map f xs)
-              ef u             = u
-    evalfuncs (u:uus) = u : evalfuncs uus
-    evalfuncs []      = []
-    grabName :: [UPlot] -> ([PlotKind],[UPlot])
-    grabName (UString n:uus) = case grabName uus of
-                               (ks,uus') -> (str2k n++ks,uus')
-    grabName (UKind ks:uus)  = case grabName uus of
-                               (ks',uus') -> (ks++ks',uus')
-    grabName uus             = ([],uus)
-    isX (X _) = True
-    isX _     = False
-
--- | The main plotting function.  The idea behind PlotType is shamelessly
---   copied from Text.Printf (and is not exported).  All you need to know is
---   that your arguments need to be in class PlotArg.  And PlotArg consists
---   of functions and [Double] and String and PlotKind or [PlotKind].
-
-plot :: PlotType a => a
-plot = pl []
-class PlotType t where
-    pl     :: [UPlot] -> t
-instance (PlotArg a, PlotType r) => PlotType (a -> r) where
-    pl args = \ a -> pl (toUPlot a ++ args)
-instance PlotType Layout1DDD where
-    pl args = uplot (reverse args)
-
-#if HAVE_GTK
--- | Display a plot on the screen.
-
-plotWindow :: PlotWindowType a => a
-plotWindow = plw []
-class PlotWindowType t where
-    plw     :: [UPlot] -> t
-instance (PlotArg a, PlotWindowType r) => PlotWindowType (a -> r) where
-    plw args = \ a -> plw (toUPlot a ++ args)
-instance PlotWindowType (IO a) where
-    plw args = do
-        renderableToWindow (toRenderable $ uplot (reverse args)) 640 480
-        return undefined
-#endif
-
--- | Save a plot as a PDF file.
-
-plotPDF :: PlotPDFType a => String -> a
-plotPDF fn = pld fn []
-class PlotPDFType t where
-    pld        :: FilePath -> [UPlot] -> t
-instance (PlotArg a, PlotPDFType r) => PlotPDFType (a -> r) where
-    pld fn args = \ a -> pld fn (toUPlot a ++ args)
-instance PlotPDFType (IO a) where
-    pld fn args = do
-        renderableToPDFFile (toRenderable $ uplot (reverse args)) 640 480 fn
-        return undefined
-
--- | Save a plot as a postscript file.
-
-plotPS :: PlotPSType a => String -> a
-plotPS fn = pls fn []
-class PlotPSType t where
-    pls        :: FilePath -> [UPlot] -> t
-instance (PlotArg a, PlotPSType r) => PlotPSType (a -> r) where
-    pls fn args = \ a -> pls fn (toUPlot a ++ args)
-instance PlotPSType (IO a) where
-    pls fn args = do
-        renderableToPSFile (toRenderable $ uplot (reverse args)) 640 480 fn
-        return undefined
-
--- | Save a plot as a png file.
-plotPNG :: PlotPNGType a => String -> a
-plotPNG fn = plp fn []
-
-class PlotPNGType t where
-    plp        :: FilePath -> [UPlot] -> t
-instance (PlotArg a, PlotPNGType r) => PlotPNGType (a -> r) where
-    plp fn args = \ a -> plp fn (toUPlot a ++ args)
-instance PlotPNGType (IO a) where
-    plp fn args = do
-        renderableToPNGFile (toRenderable $ uplot (reverse args)) 640 480 fn
-        return undefined
-
-
-
-data UPlot = UString String | UDoubles [Double] | UFunction (Double -> Double)
-           | UKind [PlotKind] | X [Double]
-
-xcoords :: [Double] -> UPlot
-xcoords = X
-
-class PlotArg a where
-    toUPlot :: a -> [UPlot]
-
-instance IsPlot p => PlotArg [p] where
-    toUPlot = toUPlot'
-
-instance (Real a, Real b, Fractional a, Fractional b) => PlotArg (a -> b) where
-    toUPlot x = [UFunction (realToFrac . x . realToFrac)]
-
-instance (Real a, Real b, Fractional a, Fractional b) => IsPlot (a -> b) where
-    toUPlot' = reverse . concatMap f
-        where f x = [UFunction (realToFrac . x . realToFrac)]
-
-instance PlotArg UPlot where
-    toUPlot = (:[])
-
-instance PlotArg PlotKind where
-    toUPlot = (:[]) . UKind . (:[])
-
-
-class IsPlot c where
-    toUPlot' :: [c] -> [UPlot]
-
-instance IsPlot PlotKind where
-    toUPlot' = (:[]) . UKind
-
-instance IsPlot Double where
-    toUPlot' = (:[]) . UDoubles
-
-instance IsPlot Char where
-    toUPlot' = (:[]) . UString
-
-instance IsPlot p => IsPlot [p] where
-    toUPlot' = reverse . concatMap toUPlot'
-
-instance (IsPlot p, IsPlot q, IsPlot r) => IsPlot (p,q,r) where
-    toUPlot' = reverse . concatMap f
-        where f (p,q,r) = toUPlot' [p] ++ toUPlot' [q] ++ toUPlot' [r]
-
-instance (IsPlot p, IsPlot q) => IsPlot (p,q) where
-    toUPlot' = reverse . concatMap f
-        where f (p,q) = toUPlot' [p] ++ toUPlot' [q]
+import Graphics.Rendering.Chart.Simple.Internal
diff --git a/Graphics/Rendering/Chart/Simple/Internal.hs b/Graphics/Rendering/Chart/Simple/Internal.hs
new file mode 100644
--- /dev/null
+++ b/Graphics/Rendering/Chart/Simple/Internal.hs
@@ -0,0 +1,277 @@
+module Graphics.Rendering.Chart.Simple.Internal where
+
+import Data.Maybe ( catMaybes )
+import Data.Colour
+import Data.Colour.Names
+
+import Graphics.Rendering.Chart
+
+styleColor :: Int -> AlphaColour Double
+styleColor ind = colorSequence !! ind
+    where colorSequence = cycle $ map opaque [ blue, red, green, yellow
+                                             , cyan, magenta, black ]
+
+styleSymbol :: Int -> PlotKind
+styleSymbol ind = symbolSequence !! ind
+    where symbolSequence = cycle [ Ex, HollowCircle, Square, Diamond
+                                 , Triangle, DownTriangle, Plus, Star
+                                 , FilledCircle ]
+
+-- When defaultLayout1 has been generalized, change this signature to 
+-- [InternalPlot x y] -> Layout1 x y z
+iplot :: [InternalPlot Double Double] -> Layout1 Double Double
+iplot foobar = defaultLayout1 {
+        layout1_plots_ = concat $ zipWith toplot (ip foobar) [0..]
+    }
+  where
+    ip (xs@(IPX _ _):xyss) = map (\ys -> (xs,ys)) yss ++ ip rest
+                where yss  = takeWhile isIPY xyss
+                      rest = dropWhile isIPY xyss
+    ip (_:xyss) = ip xyss
+    ip   []     = []
+    isIPY (IPY _ _) = True
+    isIPY _         = False
+    toplot (IPX xs _, IPY ys yks) ind = map Left plots
+      where
+        vs = zip xs ys
+        plots = case catMaybes $ map plotas yks of
+                    [] -> [ toPlot $ defaultPlotLines
+                           { plot_lines_title_  = name yks,
+                             plot_lines_values_ = [vs],
+                             plot_lines_style_  = solidLine 1 (styleColor ind)
+                           } ]
+                    xs -> xs
+        plotas Solid = Just $ toPlot $ defaultPlotLines
+                         { plot_lines_title_  = name yks,
+                           plot_lines_values_ = [vs],
+                           plot_lines_style_  = solidLine 1 (styleColor ind) }
+        plotas Dashed = Just $ toPlot $ defaultPlotLines
+                         { plot_lines_title_  = name yks,
+                           plot_lines_values_ = [vs],
+                           plot_lines_style_  = dashedLine 1 [10,10]
+                                                           (styleColor ind) }
+        plotas Dotted = Just $ toPlot $ defaultPlotLines
+                         { plot_lines_title_  = name yks,
+                           plot_lines_values_ = [vs],
+                           plot_lines_style_  = dashedLine 1 [1,11]
+                                                           (styleColor ind) }
+        plotas FilledCircle = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = filledCircles 4
+                                                           (styleColor ind) }
+        plotas HollowCircle = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = hollowCircles 5 1
+                                                           (styleColor ind) }
+        plotas Triangle = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = hollowPolygon 7 1 3 False
+                                                           (styleColor ind) }
+        plotas DownTriangle = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = hollowPolygon 7 1 3 True
+                                                           (styleColor ind) }
+        plotas Square = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = hollowPolygon 7 1 4 False
+                                                           (styleColor ind) }
+        plotas Diamond = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = hollowPolygon 7 1 4 True
+                                                           (styleColor ind) }
+        plotas Plus = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = plusses 7 1 (styleColor ind) }
+        plotas Ex = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = exes 7 1 (styleColor ind) }
+        plotas Star = Just $ toPlot $ defaultPlotPoints
+                         { plot_points_title_  = name yks,
+                           plot_points_values_ = vs,
+                           plot_points_style_  = stars 7 1 (styleColor ind) }
+        plotas Symbols = plotas (styleSymbol ind)
+        plotas _ = Nothing
+
+name :: [PlotKind] -> String
+name (Name s:_) = s
+name (_:ks)     = name ks
+name []         = ""
+
+str2k :: String -> [PlotKind]
+str2k ""        = []
+str2k ". "      = [Dotted]
+str2k s@('?':_) = str2khelper s Symbols
+str2k s@('@':_) = str2khelper s FilledCircle
+str2k s@('#':_) = str2khelper s Square
+str2k s@('v':_) = str2khelper s DownTriangle
+str2k s@('^':_) = str2khelper s Triangle
+str2k s@('o':_) = str2khelper s HollowCircle
+str2k s@('+':_) = str2khelper s Plus
+str2k s@('x':_) = str2khelper s Ex
+str2k s@('*':_) = str2khelper s Star
+str2k s@('.':_) = str2khelper s LittleDot
+str2k "- "      = [Dashed]
+str2k "-"       = [Solid]
+str2k n         = [Name n]
+
+str2khelper :: String -> PlotKind -> [PlotKind]
+str2khelper s@(_:r) x = case str2k r of
+                          []       -> [x]
+                          [Name _] -> [Name s]
+                          xs       -> x:xs
+
+-- | Type to define a few simple properties of each plot.
+data PlotKind = Name String | FilledCircle | HollowCircle
+              | Triangle | DownTriangle | Square | Diamond
+              | Plus | Ex | Star | Symbols
+              | LittleDot | Dashed | Dotted | Solid
+              deriving ( Eq, Show, Ord )
+data InternalPlot x y = IPY [y] [PlotKind] | IPX [x] [PlotKind]
+
+newtype Layout1DDD = Layout1DDD { plotLayout :: Layout1 Double Double }
+instance ToRenderable Layout1DDD where
+ toRenderable = toRenderable . plotLayout
+
+uplot :: [UPlot] -> Layout1DDD
+uplot us = Layout1DDD $ iplot $ nameDoubles $ evalfuncs us
+  where
+    nameDoubles :: [UPlot] -> [InternalPlot Double Double]
+    nameDoubles (X xs: uus)      = case grabName uus of
+                                   (ks,uus') -> IPX (filter isValidNumber xs) ks
+                                                : nameDoubles uus'
+    nameDoubles (UDoubles xs:uus)= case grabName uus of
+                                   (ks,uus') -> IPY (filter isValidNumber xs) ks
+                                                : nameDoubles uus'
+    nameDoubles (_:uus)          = nameDoubles uus
+    nameDoubles []               = []
+    evalfuncs :: [UPlot] -> [UPlot]
+    evalfuncs (UDoubles xs:uus) = X xs : map ef (takeWhile (not.isX) uus)
+                                  ++ evalfuncs (dropWhile (not.isX) uus)
+        where ef (UFunction f) = UDoubles (map f xs)
+              ef u             = u
+    evalfuncs (X xs:uus) = X xs : map ef (takeWhile (not.isX) uus)
+                           ++ evalfuncs (dropWhile (not.isX) uus)
+        where ef (UFunction f) = UDoubles (map f xs)
+              ef u             = u
+    evalfuncs (u:uus) = u : evalfuncs uus
+    evalfuncs []      = []
+    grabName :: [UPlot] -> ([PlotKind],[UPlot])
+    grabName (UString n:uus) = case grabName uus of
+                               (ks,uus') -> (str2k n++ks,uus')
+    grabName (UKind ks:uus)  = case grabName uus of
+                               (ks',uus') -> (ks++ks',uus')
+    grabName uus             = ([],uus)
+    isX (X _) = True
+    isX _     = False
+
+-- | The main plotting function.  The idea behind PlotType is shamelessly
+--   copied from Text.Printf (and is not exported).  All you need to know is
+--   that your arguments need to be in class PlotArg.  And PlotArg consists
+--   of functions and [Double] and String and PlotKind or [PlotKind].
+
+plot :: PlotType a => a
+plot = pl []
+class PlotType t where
+    pl     :: [UPlot] -> t
+instance (PlotArg a, PlotType r) => PlotType (a -> r) where
+    pl args = \ a -> pl (toUPlot a ++ args)
+instance PlotType Layout1DDD where
+    pl args = uplot (reverse args)
+
+-- | Save a plot as a PDF file.
+
+plotPDF :: PlotPDFType a => String -> a
+plotPDF fn = pld fn []
+class PlotPDFType t where
+    pld        :: FilePath -> [UPlot] -> t
+instance (PlotArg a, PlotPDFType r) => PlotPDFType (a -> r) where
+    pld fn args = \ a -> pld fn (toUPlot a ++ args)
+instance PlotPDFType (IO a) where
+    pld fn args = do
+        renderableToPDFFile (toRenderable $ uplot (reverse args)) 640 480 fn
+        return undefined
+
+-- | Save a plot as a postscript file.
+
+plotPS :: PlotPSType a => String -> a
+plotPS fn = pls fn []
+class PlotPSType t where
+    pls        :: FilePath -> [UPlot] -> t
+instance (PlotArg a, PlotPSType r) => PlotPSType (a -> r) where
+    pls fn args = \ a -> pls fn (toUPlot a ++ args)
+instance PlotPSType (IO a) where
+    pls fn args = do
+        renderableToPSFile (toRenderable $ uplot (reverse args)) 640 480 fn
+        return undefined
+
+-- | Save a plot as a png file.
+plotPNG :: PlotPNGType a => String -> a
+plotPNG fn = plp fn []
+
+class PlotPNGType t where
+    plp        :: FilePath -> [UPlot] -> t
+instance (PlotArg a, PlotPNGType r) => PlotPNGType (a -> r) where
+    plp fn args = \ a -> plp fn (toUPlot a ++ args)
+instance PlotPNGType (IO a) where
+    plp fn args = do
+        renderableToPNGFile (toRenderable $ uplot (reverse args)) 640 480 fn
+        return undefined
+
+
+
+data UPlot = UString String | UDoubles [Double] | UFunction (Double -> Double)
+           | UKind [PlotKind] | X [Double]
+
+xcoords :: [Double] -> UPlot
+xcoords = X
+
+class PlotArg a where
+    toUPlot :: a -> [UPlot]
+
+instance IsPlot p => PlotArg [p] where
+    toUPlot = toUPlot'
+
+instance (Real a, Real b, Fractional a, Fractional b) => PlotArg (a -> b) where
+    toUPlot x = [UFunction (realToFrac . x . realToFrac)]
+
+instance (Real a, Real b, Fractional a, Fractional b) => IsPlot (a -> b) where
+    toUPlot' = reverse . concatMap f
+        where f x = [UFunction (realToFrac . x . realToFrac)]
+
+instance PlotArg UPlot where
+    toUPlot = (:[])
+
+instance PlotArg PlotKind where
+    toUPlot = (:[]) . UKind . (:[])
+
+
+class IsPlot c where
+    toUPlot' :: [c] -> [UPlot]
+
+instance IsPlot PlotKind where
+    toUPlot' = (:[]) . UKind
+
+instance IsPlot Double where
+    toUPlot' = (:[]) . UDoubles
+
+instance IsPlot Char where
+    toUPlot' = (:[]) . UString
+
+instance IsPlot p => IsPlot [p] where
+    toUPlot' = reverse . concatMap toUPlot'
+
+instance (IsPlot p, IsPlot q, IsPlot r) => IsPlot (p,q,r) where
+    toUPlot' = reverse . concatMap f
+        where f (p,q,r) = toUPlot' [p] ++ toUPlot' [q] ++ toUPlot' [r]
+
+instance (IsPlot p, IsPlot q) => IsPlot (p,q) where
+    toUPlot' = reverse . concatMap f
+        where f (p,q) = toUPlot' [p] ++ toUPlot' [q]
diff --git a/tests/Test1.hs b/tests/Test1.hs
--- a/tests/Test1.hs
+++ b/tests/Test1.hs
@@ -1,7 +1,6 @@
 module Test1 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Colour.SRGB
@@ -34,7 +33,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test1_small.png"
 main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test1_big.png"
-main1 _          = renderableToWindow  (chart 1.00) 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/Test14.hs b/tests/Test14.hs
--- a/tests/Test14.hs
+++ b/tests/Test14.hs
@@ -1,7 +1,6 @@
 module Test14 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -43,6 +42,5 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test14_small.png"
 main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test14_big.png"
-main1 _          = renderableToWindow  (chart 1.00) 640 480 >> return undefined
 
 main = getArgs >>= main1
diff --git a/tests/Test14a.hs b/tests/Test14a.hs
--- a/tests/Test14a.hs
+++ b/tests/Test14a.hs
@@ -1,7 +1,6 @@
 module Test14a where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Graphics.Rendering.Chart.Plot
 import Data.Colour
 import Data.Colour.Names
@@ -45,6 +44,5 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test14_small.png"
 main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test14_big.png"
-main1 _          = renderableToWindow  (chart 1.00) 640 480 >> return undefined
 
 main = getArgs >>= main1
diff --git a/tests/Test15.hs b/tests/Test15.hs
--- a/tests/Test15.hs
+++ b/tests/Test15.hs
@@ -1,7 +1,6 @@
 module Test15 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -38,7 +37,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart (LORows 3)) 320 240 "test15_small.png"
 main1 ["big"]    = renderableToPNGFile (chart (LORows 3)) 800 600 "test15_big.png"
-main1 _          = renderableToWindow  (chart (LORows 3)) 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/Test17.hs b/tests/Test17.hs
--- a/tests/Test17.hs
+++ b/tests/Test17.hs
@@ -1,7 +1,6 @@
 module Test17 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -75,8 +74,7 @@
                        $ defaultPlotLines ^. plot_lines_style
 
 main1 :: [String] -> IO (PickFn ())
-main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test17_small.png"
-main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test17_big.png"
-main1 _          = renderableToWindow  (chart 1.00) 640 480 >> return undefined
+main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test1_small.png"
+main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test1_big.png"
 
 main = getArgs >>= main1
diff --git a/tests/Test2.hs b/tests/Test2.hs
--- a/tests/Test2.hs
+++ b/tests/Test2.hs
@@ -1,7 +1,6 @@
 module Test2 where
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Time.LocalTime
 import Data.Colour
 import Data.Colour.Names
@@ -59,6 +58,5 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart prices2 True 0.25) 320 240 "test2_small.png"
 main1 ["big"]    = renderableToPNGFile (chart prices2 True 0.25) 800 600 "test2_big.png"
-main1 _          = renderableToWindow  (chart prices2 True 1.00) 640 480 >> return undefined
 
 main = getArgs >>= main1
diff --git a/tests/Test3.hs b/tests/Test3.hs
--- a/tests/Test3.hs
+++ b/tests/Test3.hs
@@ -1,7 +1,6 @@
 module Test3 where
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Time.LocalTime
 import Data.Colour
 import Data.Colour.Names
@@ -35,6 +34,5 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile chart 320 240 "test3_small.png"
 main1 ["big"]    = renderableToPNGFile chart 800 600 "test3_big.png"
-main1 _          = renderableToWindow  chart 640 480 >> return undefined
 
 main = getArgs >>= main1
diff --git a/tests/Test4.hs b/tests/Test4.hs
--- a/tests/Test4.hs
+++ b/tests/Test4.hs
@@ -1,7 +1,6 @@
 module Test4 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -32,7 +31,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart False False) 320 240 "test4_small.png"
 main1 ["big"]    = renderableToPNGFile (chart False False) 800 600 "test4_big.png"
-main1 _          = renderableToWindow  (chart False False) 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/Test5.hs b/tests/Test5.hs
--- a/tests/Test5.hs
+++ b/tests/Test5.hs
@@ -1,7 +1,6 @@
 module Test5 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -43,7 +42,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test5_small.png"
 main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test5_big.png"
-main1 _          = renderableToWindow  (chart 1.00) 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/Test6.hs b/tests/Test6.hs
--- a/tests/Test6.hs
+++ b/tests/Test6.hs
@@ -2,7 +2,6 @@
 
 import Graphics.Rendering.Chart
 import Graphics.Rendering.Chart.Simple
-import Graphics.Rendering.Chart.Gtk
 import System.Environment(getArgs)
 
 chart :: Renderable ()
@@ -19,6 +18,5 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile chart 320 240 "test6_small.png"
 main1 ["big"]    = renderableToPNGFile chart 800 600 "test6_big.png"
-main1 _          = renderableToWindow  chart 640 480 >> return undefined
 
 main = getArgs >>= main1
diff --git a/tests/Test7.hs b/tests/Test7.hs
--- a/tests/Test7.hs
+++ b/tests/Test7.hs
@@ -1,7 +1,6 @@
 module Test7 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -29,7 +28,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile chart 320 240 "test7_small.png"
 main1 ["big"]    = renderableToPNGFile chart 800 600 "test7_big.png"
-main1 _          = renderableToWindow  chart 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/Test8.hs b/tests/Test8.hs
--- a/tests/Test8.hs
+++ b/tests/Test8.hs
@@ -1,7 +1,6 @@
 module Test8 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Accessor
 import System.Environment(getArgs)
 
@@ -19,7 +18,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile chart 320 240 "test8_small.png"
 main1 ["big"]    = renderableToPNGFile chart 800 600 "test8_big.png"
-main1 _          = renderableToWindow  chart 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/Test9.hs b/tests/Test9.hs
--- a/tests/Test9.hs
+++ b/tests/Test9.hs
@@ -1,7 +1,6 @@
 module Test9 where 
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -33,7 +32,6 @@
 main1 :: [String] -> IO (PickFn ())
 main1 ["small"]  = renderableToPNGFile (chart True) 320 240 "test9_small.png"
 main1 ["big"]    = renderableToPNGFile (chart True) 800 600 "test9_big.png"
-main1 _          = renderableToWindow  (chart True) 640 480 >> return undefined
 
 main = getArgs >>= main1
 
diff --git a/tests/TestParametric.hs b/tests/TestParametric.hs
--- a/tests/TestParametric.hs
+++ b/tests/TestParametric.hs
@@ -1,7 +1,6 @@
 module TestParametric where
 
 import Graphics.Rendering.Chart
-import Graphics.Rendering.Chart.Gtk
 import Data.Colour
 import Data.Colour.Names
 import Data.Accessor
@@ -23,8 +22,7 @@
            $ defaultLayout1
 
 main1 :: [String] -> IO (PickFn ())
-main1 ["small"]  = renderableToPNGFile (chart 1.00) 320 240 "test_parametric_small.png"
-main1 ["big"]    = renderableToPNGFile (chart 1.00) 800 600 "test_parametric_big.png"
-main1 _          = renderableToWindow  (chart 1.00) 640 480 >> return undefined
+main1 ["small"]  = renderableToPNGFile (chart 0.25) 320 240 "test1_small.png"
+main1 ["big"]    = renderableToPNGFile (chart 0.25) 800 600 "test1_big.png"
 
 main = getArgs >>= main1
diff --git a/tests/all_tests.hs b/tests/all_tests.hs
--- a/tests/all_tests.hs
+++ b/tests/all_tests.hs
@@ -1,7 +1,6 @@
 import qualified Graphics.Rendering.Cairo as C
 import Graphics.Rendering.Chart
 import Graphics.Rendering.Chart.Simple
-import Graphics.Rendering.Chart.Gtk
 import Graphics.Rendering.Chart.Grid
 
 import System.Environment(getArgs)
@@ -32,9 +31,8 @@
 import qualified Test17
 import qualified TestParametric
 
-data OutputType = Window | PNG | PS | PDF | SVG
+data OutputType = PNG | PS | PDF | SVG
 
-chooseLineWidth Window = 1.0
 chooseLineWidth PNG = 1.0
 chooseLineWidth PDF = 0.25
 chooseLineWidth PS = 0.25
@@ -388,11 +386,11 @@
     main1 args
 
 main1 :: [String] -> IO ()
-main1 ("--png":tests) = showTests tests renderToPNG
 main1 ("--pdf":tests) = showTests tests renderToPDF
 main1 ("--svg":tests) = showTests tests renderToSVG
 main1 ("--ps":tests) = showTests tests renderToPS
-main1 tests = showTests tests renderToWindow
+main1 ("--png":tests) = showTests tests renderToPNG
+main1 tests = showTests tests renderToPNG
 
 showTests :: [String] -> ((String,OutputType -> Renderable ()) -> IO()) -> IO ()
 showTests tests ofn = mapM_ doTest (filter (match tests) allTests)
@@ -406,7 +404,6 @@
 match [] t = True
 match ts t = (fst t) `elem` ts
 
-renderToWindow (n,ir) = renderableToWindow (ir Window) 640 480
 renderToPNG (n,ir) = renderableToPNGFile (ir PNG) 640 480 (n ++ ".png")
                      >> return ()
 renderToPS (n,ir) = renderableToPSFile (ir PS) 640 480 (n ++ ".ps")
