let draw_dotted_lines window ~color points =
    set_color color;
    match points with
      [x, y; x', y'] when x = x' && y <= y' ->
        let y0 = ref y in
        while !y0 <= y' do
          plot x !y0;
          y0 := !y0 + 2
        done
    | _ -> assert false