Questions about the Chart Haskell library, which allows rendering various kinds of 2D charts and plots using Cairo and Diagrams backends.
Questions tagged [haskell-chart]
7 questions
9
votes
1 answer
How to set the range of the axis in the Haskell Chart library
In haskell-chart, how do you change the range of an axis? It seems like it has something to do with lenses and viewports, but as a beginner in Haskell, I'm having a hard time reading the…

Craig
- 255
- 1
- 6
7
votes
2 answers
Generate ByteString in Haskell-Chart
I use Haskell-Chart according to the example eample-1. Haskell-Chart generates content to file
toFile def "example1_big.png" $ do
...
Is it possible generate content of chart to ByteString instead file?
I can not find a solution in the…

QSpider
- 537
- 2
- 10
3
votes
1 answer
Haskell Chart breaks stack build
Trying using Chart for learning Haskell. Package breaks in building with:
/private/var/folders/m2/qwhdrn_d46z99_3vxchdwn7r0000gn/T/stack5630/Chart-1.9/Graphics/Rendering/Chart/State.hs:102:3: error:
• No instance for…

Madderote
- 1,107
- 10
- 19
3
votes
1 answer
Human readable numbers with Haskell Charts
I'm trying to use Haskell-Charts (http://hackage.haskell.org/package/Chart) to generate some graphs. It works fine and I get a nice graph
My only "problem" are the numbers on the left, that's a bit hard to read. Is there a way to maybe provide a…

Ulrar
- 895
- 8
- 17
2
votes
1 answer
How do I set a background colour of a chart in the Haskell Chart package?
I've got a complete example here: https://github.com/chrissound/HaskellChartBarGraphExample/tree/backgroundColour
How can I set a background colour of a chart? I've tried fillBackground.
chart :: Bool -> Renderable ()
chart borders =…

Chris Stryczynski
- 30,145
- 48
- 175
- 286
1
vote
1 answer
How to properly setup Chart using Diagrams backend?
I am trying to test Chart using the Diagrams backend (both from Stackage) with this example
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams
signal :: [Double] -> [(Double,Double)]
signal xs = [ (x,(sin…

atis
- 881
- 5
- 22
0
votes
1 answer
Set Size of Plot in IHaskell (Jupyter) with Chart Package
I am able to do a simple 2D plot inside a Jupyter Notebook (with IHaskell) using the Haskell Chart Package. The code is here,
import Graphics.Rendering.Chart.Easy
cData = [1,2,3,4,3,2,1]
toRenderable $ do
layout_title .= "Recovered Signal"
…

TomP
- 108
- 6