Chart-1.5.4: A library for generating 2D Charts and Plots

Copyright (c) Tim Docker 2014 BSD-style (see chart/COPYRIGHT) None Haskell98

Graphics.Rendering.Chart.Easy

Description

A high level API for generating a plot quickly.

Importing the Easy module brings into scope all core functions and types required for working with the chart library. This includes key external dependencies such as Control.Len and Data.Colour. The module also provides several helper functions for quickly generating common plots. Note that chart backends must still be explicitly imported, as some backends cannot be built on all platforms.

Example usage:

```import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Cairo

signal :: [Double] -> [(Double,Double)]
signal xs = [ (x,(sin (x*3.14159/45) + 1) / 2 * (sin (x*3.14159/5))) | x <- xs ]

main = toFile def "example.png" \$ do
layout_title .= "Amplitude Modulation"
plot (line "am" [signal [0,(0.5)..400]])
plot (points "am points" (signal [0,7..400]))```

More examples can be found on the library's wiki

Synopsis

# Documentation

line :: String -> [[(x, y)]] -> EC l (PlotLines x y) Source

Constuct a line plot with the given title and data, using the next available color.

points :: String -> [(x, y)] -> EC l (PlotPoints x y) Source

Construct a scatter plot with the given title and data, using the next available color and point shape.

bars :: (PlotValue x, BarsPlotValue y) => [String] -> [(x, [y])] -> EC l (PlotBars x y) Source

Construct a bar chart with the given titles and data, using the next available colors

setColors :: [AlphaColour Double] -> EC l () Source

Set the contents of the colour source, for subsequent plots

setShapes :: [PointShape] -> EC l () Source

Set the contents of the shape source, for subsequent plots
{"ft_lang_label":"__label__en","ft_lang_prob":0.70196974,"math_prob":0.8492225,"size":2286,"snap":"2021-04-2021-17","text_gpt3_token_len":593,"char_repetition_ratio":0.12839614,"word_repetition_ratio":0.29131654,"special_character_ratio":0.2913386,"punctuation_ratio":0.19585253,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9688887,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-14T20:31:49Z\",\"WARC-Record-ID\":\"<urn:uuid:de8531fd-bd8c-412c-b62f-170f4a76f2b3>\",\"Content-Length\":\"8958\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:98546883-31a1-4c97-bef7-368d9c8c57fc>\",\"WARC-Concurrent-To\":\"<urn:uuid:a55061aa-79df-4eca-b44a-6e7e2c9396ab>\",\"WARC-IP-Address\":\"151.101.200.68\",\"WARC-Target-URI\":\"https://hackage.haskell.org/package/Chart-1.5.4/docs/Graphics-Rendering-Chart-Easy.html\",\"WARC-Payload-Digest\":\"sha1:UCSV3Z5XIN4S62ORD7PT4K2GHEQWWR7J\",\"WARC-Block-Digest\":\"sha1:R7DQ4HHA6IWNGQ4HVUP3YTQ43FEKDG6V\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618038078021.18_warc_CC-MAIN-20210414185709-20210414215709-00299.warc.gz\"}"}