Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell Diagrams: How can I make the text bigger?

I'm using the diagrams haskell drawing framework. The code below is intended to produce an orange hexagon with the text "(0,0)" superimposed on it. Unfortunately, the text is tiny. I've tried to make it bigger by modifying the size of the rect, but no luck.

import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine

diagram = mconcat [ text "(0,0)" <> rect 8 1,
                    hexagon 20 # lw 0.02 # fc orange # rotateBy (1/4) ]

main = defaultMain (pad 1.1 diagram)
like image 840
mhwombat Avatar asked Mar 21 '13 15:03

mhwombat


1 Answers

As hammar suggests, you could use scale, like so:

(text "(0,0)" <> rect 8 1) # scale 5

You can also change the font size, like

text "(0,0)" # fontSize 5 ...

like image 88
Brent Yorgey Avatar answered Nov 15 '22 12:11

Brent Yorgey