added custom Y axis range
This commit is contained in:
parent
6c2b12c89b
commit
8038361c76
@ -14,6 +14,8 @@ main :: IO ()
|
||||
main = do
|
||||
apiKey <- getWeatherKey
|
||||
|
||||
generatePlot 20 35 25 --example
|
||||
|
||||
putStrLn "Enter a city name: "
|
||||
city <- getLine
|
||||
|
||||
|
@ -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]
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 99 KiB |
Loading…
Reference in New Issue
Block a user