# periodic function
var('t')
f1 = 2*unit_step(t-2)
f2 = 1*unit_step(t-3)
f3 = -3*unit_step(t-5)
f4 = 2*unit_step(t-7)
f5 = 1*unit_step(t-8)
f6 = -3*unit_step(t-10)
f = f1+f2+f3+f4+f5+f6
G = plot(0,t,0,2,thickness = 5,ticks=[[1,2,3,4,5,6,7,8,9,10,11,12],[1,2,3,4]])+plot(2,t,2,3,thickness = 5)+plot(3,t,3,5,thickness = 5)+plot(0,t,5,7,thickness = 5)+plot(2,t,7,8,thickness = 5)+plot(3,t,8,10,thickness = 5)
G += circle((10.5,1.5),.1,fill=true)+circle((11,1.5),.1,fill=true)+circle((11.5,1.5),.1,fill=true)
G.show()