diff --git a/app/Main.hs b/app/Main.hs index e8181a7..52ec34b 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -14,6 +14,8 @@ main :: IO () main = do apiKey <- getWeatherKey + generatePlot 20 35 25 --example + putStrLn "Enter a city name: " city <- getLine diff --git a/app/Plot.hs b/app/Plot.hs index f3304a8..c6f291b 100644 --- a/app/Plot.hs +++ b/app/Plot.hs @@ -11,5 +11,6 @@ generatePlot :: Double -> Double -> Double -> IO () generatePlot yday tday tmrw = toFile def "plot/weather.svg" $ do layout_title .= "Yesterday, Today, and Tomorrow's Temperatures" layout_margin .= 30 + layout_y_axis . laxis_generate .= scaledAxis def (-10, 40) layout_x_axis . laxis_generate .= autoIndexAxis ["Yesterday", "Today", "Tomorrow"] plot $ line "Degrees Celsius" [formatData yday tday tmrw] \ No newline at end of file diff --git a/plot/weather.svg b/plot/weather.svg index 30d444f..d308773 100644 --- a/plot/weather.svg +++ b/plot/weather.svg @@ -1,3 +1,3 @@ \ No newline at end of file + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> \ No newline at end of file