# Drawing fundamental domains with sage

What is the easiest way to draw fundamental domains for congruence subgroups of $SL_2(\mathbb{Z})$ in sage?

An easy way is to use FareySymbol. You can for example define the congruence subgroup $\Gamma_1(5)$ like this:

G = Gamma1(5)


Then use this to plot a fundamental domain:

FareySymbol(G).fundamental_domain()


This yields the following image:

• This helps a lot thank you! Is there a way to get a result what is symmetric in the y-axis?
– user360730
Aug 23, 2016 at 8:42
• @mathmarseille There might be, but I don't know how to! The only options I could find were "fill", "linestyle", "color", "show_pairing", "tesselation", "color_even", "thickness" and "ymax". Aug 23, 2016 at 15:56