How to correctly align arrow tip

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?










share|improve this question





















  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    2 days ago















up vote
3
down vote

favorite












I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?










share|improve this question





















  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    2 days ago













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?










share|improve this question













I have got this code:



tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;

path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(0pt,-20pt) |- ++(-170pt,-20pt) |- (a.south);
endtikzpicture


Which produces this graph:
enter image description here



I would like to align the arrow tip direction at the center of A. Can you help me please?







tikz-pgf tikz-arrows






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









ojenn

524




524











  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    2 days ago

















  • Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
    – Jasper Habicht
    2 days ago
















Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
– Jasper Habicht
2 days ago





Change the second last line to path [draw, ->, ultra thick, dashed] (c.south) |- ([yshift=-20pt]a.south) -- (a.south);. The reason why the arrow tip is turned is that a.south is a tiny bit to the left of the coordinate that you are shifting to with ++(0pt,-20pt) |- ++(-170pt,-20pt).
– Jasper Habicht
2 days ago











2 Answers
2






active

oldest

votes

















up vote
5
down vote



accepted










You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer


















  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    2 days ago










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    2 days ago










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    2 days ago










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    2 days ago

















up vote
4
down vote













I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    2 days ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450299%2fhow-to-correctly-align-arrow-tip%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote



accepted










You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer


















  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    2 days ago










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    2 days ago










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    2 days ago










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    2 days ago














up vote
5
down vote



accepted










You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer


















  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    2 days ago










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    2 days ago










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    2 days ago










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    2 days ago












up vote
5
down vote



accepted







up vote
5
down vote



accepted






You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument





share|improve this answer














You've used the operation |- too many times. These operation |- makes it possible to draw two lines, the first vertical, the second horizontal.



First : You arrive at the bottom left, then just go directly to A with the operation line to --.



chemin-tikz



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(-170pt,-20pt) -- (a.south);
endtikzpicture
enddocument


Edit: In order to correct the vertical as noticed by @JasperHabicht



In order for the last arrow to be effectively vertical, a point under block A can be defined with a distance of 20 pt.



coordinate[below of=a,node distance=20pt](d);


chemin-tikz-corrige



documentclass[border=5pt,tikz]standalone
begindocument
tikzstyleblock = [rectangle, draw, text width=2em, minimum height=2em]

begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
coordinate[below of=a,node distance=20pt](d);
path [draw, ->, ultra thick] (a) -- (b);
path [draw, ->, ultra thick] (b) -- (c);
path [draw, ->, ultra thick, dashed] (c.south) |- ++(d) -| (a.south);
endtikzpicture
enddocument






share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered 2 days ago









AndréC

3,084728




3,084728







  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    2 days ago










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    2 days ago










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    2 days ago










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    2 days ago












  • 1




    Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
    – Jasper Habicht
    2 days ago










  • @JasperHabicht Indeed, I have not changed the parameters of the question.
    – AndréC
    2 days ago










  • Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
    – ojenn
    2 days ago










  • @JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
    – AndréC
    2 days ago







1




1




Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
– Jasper Habicht
2 days ago




Note that the last segment of the dashed line is slightly slanted. It may be better to shift down from a.south using yshift for example. But nice answer (+1).
– Jasper Habicht
2 days ago












@JasperHabicht Indeed, I have not changed the parameters of the question.
– AndréC
2 days ago




@JasperHabicht Indeed, I have not changed the parameters of the question.
– AndréC
2 days ago












Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
– ojenn
2 days ago




Thanks so much both of you! Jasper's answer is more dynamic, so I'm using it instead.
– ojenn
2 days ago












@JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
– AndréC
2 days ago




@JasperHabicht I have corrected the verticality, feel free to answer this question by correcting the verticality in your own way.
– AndréC
2 days ago










up vote
4
down vote













I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    2 days ago














up vote
4
down vote













I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    2 days ago












up vote
4
down vote










up vote
4
down vote









I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here






share|improve this answer














I would prefer to go without unnecessarily defining new coordinates.



documentclass[border=5pt,tikz]standalone
begindocument
tikzsetblock/.style=rectangle, draw, text width=2em, minimum height=2em
begintikzpicture[node distance = 3cm, auto]
node [block] (a) A;
node [block, right of=a] (b) B;
node [block, right of=b] (c) C;
draw[->, ultra thick] (a) -- (b);
draw[->, ultra thick] (b) -- (c);
draw[->, ultra thick, dashed] (c.south) -- ++(0,-20pt) -| (a);
endtikzpicture
enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago









marmot

56.8k462124




56.8k462124










answered 2 days ago









Diaa

2,2431642




2,2431642







  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    2 days ago












  • 1




    @marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
    – Diaa
    2 days ago







1




1




@marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
– Diaa
2 days ago




@marmot be my guest and edit it as you wish. I am not even remotely a TikZ answerer :)
– Diaa
2 days ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450299%2fhow-to-correctly-align-arrow-tip%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

Installing NextGIS Connect into QGIS 3?

One-line joke