I'm attempting to add a title to a plot made with Gnuplot in Haskell. While the program produces a graph in a stand-alone window it creates, I can't seem to get it to respond to the title function. Am I using the title function incorrectly?
I'm using Stack, with
- only "-gnuplot" added to the "dependencies:" section of package.yaml
- resolver: lts-15.7 in an unmodified stack.yaml.
on a computer running Linux Mint 19. The code and a screen shot of the pop-up window are:
module Main where
import Graphics.Gnuplot.Advanced
import Graphics.Gnuplot.Plot.TwoDimensional as P2D
import Graphics.Gnuplot.Graph.TwoDimensional as G2D
import Graphics.Gnuplot.Terminal.X11 as X11
zeroToTen = [0.0, 0.1 .. 10.0 :: Double]
main :: IO ()
main = do
plot (X11.title "My Title" X11.cons) (P2D.function G2D.lines zeroToTen sin)
_ <- getLine
return ()