Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Monomer.Graph
Contents
Description
This widget renders a Cartesian coordinate system and plots function graphs by connecting provided points. Coordinate system can be dragged and scaled. It is possible to render single points too.
This widget can receive GraphMsg
messages:
GraphSetTranslation
Point
GraphSetScale
Point
GraphReset
GraphStopAnimations
GraphFinished
Int
Millisecond
The last message is used internally.
graph [[(1,2), (1,3)], [(0,0), (1,1)]] graphWithColors [(red, [(1,2), (1,3)]), (blue, [(0,0), (1,1)])] graphWithData [[graphPoint (0, 0), graphColor red]]
Synopsis
- module Monomer.Graph.GraphCfg
- module Monomer.Graph.GraphData
- module Monomer.Graph.GraphMsg
- graph :: (WidgetModel s, WidgetEvent e) => [[(Double, Double)]] -> WidgetNode s e
- graph_ :: (WidgetModel s, WidgetEvent e) => [[(Double, Double)]] -> [GraphCfg s e] -> WidgetNode s e
- graphWithColors :: (WidgetModel s, WidgetEvent e) => [(Color, [(Double, Double)])] -> WidgetNode s e
- graphWithColors_ :: (WidgetModel s, WidgetEvent e) => [(Color, [(Double, Double)])] -> [GraphCfg s e] -> WidgetNode s e
- graphWithData :: (WidgetModel s, WidgetEvent e) => [[GraphData s e]] -> WidgetNode s e
- graphWithData_ :: (WidgetModel s, WidgetEvent e) => [[GraphData s e]] -> [GraphCfg s e] -> WidgetNode s e
Re-exported modules
module Monomer.Graph.GraphCfg
module Monomer.Graph.GraphData
module Monomer.Graph.GraphMsg
Constructors
Arguments
:: (WidgetModel s, WidgetEvent e) | |
=> [[(Double, Double)]] | The list with points. |
-> WidgetNode s e | The created graph plotter. |
Creates a graph plotter using the list with points.
Arguments
:: (WidgetModel s, WidgetEvent e) | |
=> [[(Double, Double)]] | The list with points. |
-> [GraphCfg s e] | The config options. |
-> WidgetNode s e | The created graph plotter. |
Creates a graph plotter using the list with points. Accepts config.
Arguments
:: (WidgetModel s, WidgetEvent e) | |
=> [(Color, [(Double, Double)])] | The list with colors and points. |
-> WidgetNode s e | The created graph plotter. |
Creates a graph plotter using the list with colors and points.
Arguments
:: (WidgetModel s, WidgetEvent e) | |
=> [(Color, [(Double, Double)])] | The list with colors and points. |
-> [GraphCfg s e] | The config options. |
-> WidgetNode s e | The created graph plotter. |
Creates a graph plotter using the list with colors and points. Accepts config.