# Make all the lines equally sharp [duplicate]

Graphics[{
Line[{{# - 1, -0.5}, {# - 1, 5.5}} & /@ Range[6]],
Line[{{-0.5, # - 1}, {5.5, # - 1}} & /@ Range[6]]
}]


There are two kinds of lines in this simple picture, some lines look sharp and others look blurry. How can I avoid this effect?

If I zoom in the graphics by dragging the controlled-corner, the blurry effect still exists with different lines.

-

## marked as duplicate by Yves Klett, Pinguin Dirk, Sjoerd C. de Vries, István Zachar, C. E.Oct 15 '13 at 7:57

This seems to be connected to Antialiasing (which set to Falseproduces crisp lines):

g = Graphics[{Line[{{# - 1, -0.5}, {# - 1, 5.5}} & /@ Range[6]],
Line[{{-0.5, # - 1}, {5.5, # - 1}} & /@ Range[6]]}];

Grid[{{g, Style[g, Antialiasing -> False]}}]


-
I thought it was a dupe, and here you are: mathematica.stackexchange.com/q/14543/131 – Yves Klett Oct 15 '13 at 6:27
Nice detective work! – DavidC Oct 15 '13 at 10:37

I was able to replicate the cosmetic glitch but cannot explain why it occurs.
Anyway, here are some options to minimize the effect.

You could use Gridlines:

Graphics[{}, GridLines -> {Range[6], Range[6]}, PlotRange -> {{1, 6}, {1, 6}},


Or Thin:

Graphics[{Thin,
Line[{{# - 1, -0.5}, {# - 1, 5.5}} & /@ Range[6]],
Line[{{-0.5, # - 1}, {5.5, # - 1}} & /@ Range[6]]}]


Or Thickness:

Graphics[{Thickness[.001],
Line[{{# - 1, -0.5}, {# - 1, 5.5}} & /@ Range[6]],
Line[{{-0.5, # - 1}, {5.5, # - 1}} & /@ Range[6]]}]


-
I get the same result by using your first method, but Thin and Thickness contribute nothing. Have you changed the opacity in last two methods? – withparadox2 Oct 15 '13 at 2:58
No opacity changes in the final two pictures. I should mention that I am using a Mac computer with OS X 10.8.5, Mathematica 9.0.1. – DavidC Oct 15 '13 at 10:36
Graphics[{
EdgeForm@{Black}, Opacity@0,
Table[Rectangle[{0, 0}, {i, 5}], {i, 5}],
Table[Rectangle[{0, 0}, {5, i}], {i, 5}]
}]


-