Skip to content

Commit ef9c3e6

Browse files
authored
Fix example
1 parent 723b4d3 commit ef9c3e6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ more examples see the tests.
1313

1414
```haskell
1515
{-# LANGUAGE ExtendedDefaultRules #-}
16-
import Matplotlib
1716

18-
onscreen $ contourF (\a b -> sin (degreesRadians a) + cos (degreesRadians b)) (-100) 100 (-200) 200 10
17+
import Graphics.Matplotlib
18+
19+
degreesRadians a = a * pi / 180.0
20+
21+
main :: IO ()
22+
main = do
23+
Right _ <- onscreen $ contourF (\a b -> sin (degreesRadians a) + cos (degreesRadians b)) (-100) 100 (-200) 200 10
24+
return ()
1925
```
2026

2127
We need `-XExtendedDefaultRules` to avoid having to manually having to specify certain types.

0 commit comments

Comments
 (0)