Here is a starting point.
x = y = Subdivide[4, 5];
pts = Transpose[{x, y}];
Graphics[{Line[{{0, 0}, {4, 4}}], Text[#, # + {0.3, 0}] & /@ pts, Red,
Point /@ pts}, Frame -> True]
Edit:
dist = 0.1;
Graphics[{Line[{{0, 0}, {4, 4}}], Text[#, # + {0.5, 0}] & /@ pts,
Line[{{#[[1]], #[[2]] - dist}, {#[[1]], #[[2]] + dist}}] & /@ pts}]