Python 2 (with cairo) - 239
from cairo import* s=SVGSurfaces=PSSurface('_'None,99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') Results:
