# How to get rid of the background tiny crosses when using Graphics?

I am plotting very tiny arrows. For large arrows there is no problem but for small ones, one can see little crosses in the arrow positions. I do not want to see this crosses. I just want to see no arrow if it is too small. The parameter a controls the length of the arrow. Here a very simple example:

a = 10^-8;
listb = {{{0, 0}, {2.1*a, -2.1*a}}, {{1, 0}, {2.1*a, 2.1*a}}};
Graphics[{Arrowheads[Norm@#2/0.0001], Arrow[{#1, #1 + #2}]} & @@@ listb]


How could I get rid of the tiny crosses?

Thank you.

Just add a replacement at the end:

Graphics[{Arrowheads[Norm@#2/0.0001], Arrow[{#1, #1 + #2}]} & @@@ listb] /.
{_Arrowheads, Arrow[{a_, b_}] /; Norm[a - b] <= 10^-7} -> {}


## Update

The problem seems to be a dot at the end of the arrow under certain conditions.

a = 10^-8; listb = {{{0, 0}, {2.1*a, -2.1*a}}, {{1, 0}, {2.1*a,
2.1*a}}};
Graphics[{Arrowheads[Norm@#2/0.000001], Arrow[{#1, #1 + #2}]} & @@@ listb]


enlarged:

I assume that is a consequence of the underlying graphics code used to draw it. If this is a problem, you could use an arrow head of your own, like:

h = Graphics[Polygon[.5 {{-1, 1/2}, {0, 0}, {-1, -1/2}, {-.8, 0}}]];


and then:

a = 10^-8; listb = {{{0, 0}, {2.1*a, -2.1*a}}, {{1, 0}, {2.1*a, 2.1*a}}};

Arrow[{#1, #1 + #2}]} & @@@ listb]


enlarged:

• Is the problem the size of the arrowhead of the length of the line? I take it to be the arrowhead. – Mr.Wizard Jun 24 '15 at 9:50
• It's not clear to me. I didn't see any crosses with the code posted in the question, just two dots, so I figured the OP wanted to get rid of those. (" I just want to see no arrow if it is too small.") – Sjoerd C. de Vries Jun 24 '15 at 9:52
• I figured the same. I think the issue is that very small arrowheads still render as dots (to a point) whereas lines disappear sooner. – Mr.Wizard Jun 24 '15 at 10:00
• You mean a frame around the whole figure? Use Framed in that case. Or do you mean you want a thick edge around the arrow head? EdgeForm should work but you might want to remove the filling of the polygon to see it; use FaceForm[] for that. – Sjoerd C. de Vries Jul 1 '15 at 9:33
• @Mencia Please read this. – Mr.Wizard Jul 1 '15 at 10:24

How about Chop-ing the Arrowheads size to zero below a certain threshold?

{Arrowheads[Chop[Norm@#2/0.0001, 1/100]], Arrow[{#1, #1 + #2}]} & @@@ listb

• By changing the size of the arrowheads: a = 10^-8; listb = {{{0, 0}, {2.1*a, -2.1*a}}, {{1, 0}, {2.1*a, 2.1*a}}}; Graphics[{Arrowheads[Norm@#2/0.000001], Arrow[{#1, #1 + #2}]} & @@@ listb] . Can you see how there is some dot/cross at the end of the arrowhead? That's the thing I want to get rid of . – Mencia Jun 24 '15 at 10:53
• @Mencia Yes, but using Chop with the appropriate threshold solves that problem. Are you having trouble applying this? – Mr.Wizard Jun 24 '15 at 11:12
• @ Mr.Wizard♦ thank you very much. Your solution works as well as the other one. I happened to try the other one first. – Mencia Jun 24 '15 at 11:19
• @Mencia No problem; just curious. – Mr.Wizard Jun 24 '15 at 11:33