A sawtooth wave with period 2π{\displaystyle 2\pi } described by the equation x(t)=2(ta−⌊ta+12⌋){\displaystyle x(t)=2\left({\frac {t}{a}}-\left\lfloor {\frac {t}{a}}+{\frac {1}{2}}\right\rfloor \right)} and plotted using maxima using the script:
load(draw);
draw2d( terminal=svg,dimensions=[491,126],
        grid=true,user_preamble="set zeroaxis; set mxtics; set mytics",
        xtics_axis=true,ytics_axis=true,ip_grid=[20,20],
        color=blue,label(["x",3*%pi,.1]),label(["y",.25,1.1]),yrange=[-1.1,1.1],
        xaxis_type=solid,yaxis_type=solid,line_width=1.5,
        xtics={["-3{/Symbol p}",-3*%pi],["-2{/Symbol p}",-2*%pi],["-{/Symbol p}",-%pi],
            ["{/Symbol p}",%pi],["2{/Symbol p}",2*%pi],["3{/Symbol p}",3*%pi]},
        axis_bottom=false,axis_top=false,axis_right=false,axis_left=false,
        color=red,explicit(2*( (x*0.5/%pi)-floor((x*0.5/%pi)+0.5)),x,-3.5*%pi,3.5*%pi)
        );

The axis titles were later manually changed to f(x) and x
Own work
Krishnavedala