TikZ arrow tip is drawn with two colors
up vote
4
down vote
favorite
This is my code (ConTeXt, but I think that's not relevant here):
usemodule[tikz]
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed, draw=green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
starttext
starttikzpicture
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
stoptikzpicture
stoptext
The result is:
Why is the arrow head drawn with both green and black and why do they have different sizes?
tikz-pgf color tikz-arrows
add a comment |
up vote
4
down vote
favorite
This is my code (ConTeXt, but I think that's not relevant here):
usemodule[tikz]
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed, draw=green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
starttext
starttikzpicture
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
stoptikzpicture
stoptext
The result is:
Why is the arrow head drawn with both green and black and why do they have different sizes?
tikz-pgf color tikz-arrows
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
This is my code (ConTeXt, but I think that's not relevant here):
usemodule[tikz]
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed, draw=green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
starttext
starttikzpicture
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
stoptikzpicture
stoptext
The result is:
Why is the arrow head drawn with both green and black and why do they have different sizes?
tikz-pgf color tikz-arrows
This is my code (ConTeXt, but I think that's not relevant here):
usemodule[tikz]
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed, draw=green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
starttext
starttikzpicture
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
stoptikzpicture
stoptext
The result is:
Why is the arrow head drawn with both green and black and why do they have different sizes?
tikz-pgf color tikz-arrows
tikz-pgf color tikz-arrows
asked Nov 30 at 12:03
flyx
902614
902614
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
According to page 190 of the manual, stealth arrows are built according to a quadrilateral.
The < color > will apply both to any drawing and filling operations
used to construct the path. For instance, even though the Stealth
arrow tips looks like a filled quadrilateral, it is actually
constructed by drawing a quadrilateral and then filling it in the same
color as the drawing (see the fill option below to see the
difference).
But if you specify a color for the arrow with the draw
option, it is only its border that takes on this color. For it to fill
green, it must also be filled with green.
garr/.style = {arr, dashed,draw=green,fill=green},
Here, it is enough to indicate the color without specifying draw for it to also fill the arrow.
garr/.style = {arr, dashed,green},
here a solution with PDFLatex (I don't use Context, but it's the same).
documentclass{article}
usepackage{tikz}
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed,green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
begin{document}
%starttext
begin{tikzpicture}
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
end{tikzpicture}
%stoptext
end{document}
Translated with www.DeepL.com/Translator
Thanks! I don't even remember how I ended up usingdraw=green
when justgreen
suffices.
– flyx
Nov 30 at 12:42
There are nearly a thousand different keys withTikZ
, so the extraordinary thing would be to not forget anything:-)
– AndréC
Nov 30 at 12:50
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
According to page 190 of the manual, stealth arrows are built according to a quadrilateral.
The < color > will apply both to any drawing and filling operations
used to construct the path. For instance, even though the Stealth
arrow tips looks like a filled quadrilateral, it is actually
constructed by drawing a quadrilateral and then filling it in the same
color as the drawing (see the fill option below to see the
difference).
But if you specify a color for the arrow with the draw
option, it is only its border that takes on this color. For it to fill
green, it must also be filled with green.
garr/.style = {arr, dashed,draw=green,fill=green},
Here, it is enough to indicate the color without specifying draw for it to also fill the arrow.
garr/.style = {arr, dashed,green},
here a solution with PDFLatex (I don't use Context, but it's the same).
documentclass{article}
usepackage{tikz}
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed,green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
begin{document}
%starttext
begin{tikzpicture}
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
end{tikzpicture}
%stoptext
end{document}
Translated with www.DeepL.com/Translator
Thanks! I don't even remember how I ended up usingdraw=green
when justgreen
suffices.
– flyx
Nov 30 at 12:42
There are nearly a thousand different keys withTikZ
, so the extraordinary thing would be to not forget anything:-)
– AndréC
Nov 30 at 12:50
add a comment |
up vote
5
down vote
accepted
According to page 190 of the manual, stealth arrows are built according to a quadrilateral.
The < color > will apply both to any drawing and filling operations
used to construct the path. For instance, even though the Stealth
arrow tips looks like a filled quadrilateral, it is actually
constructed by drawing a quadrilateral and then filling it in the same
color as the drawing (see the fill option below to see the
difference).
But if you specify a color for the arrow with the draw
option, it is only its border that takes on this color. For it to fill
green, it must also be filled with green.
garr/.style = {arr, dashed,draw=green,fill=green},
Here, it is enough to indicate the color without specifying draw for it to also fill the arrow.
garr/.style = {arr, dashed,green},
here a solution with PDFLatex (I don't use Context, but it's the same).
documentclass{article}
usepackage{tikz}
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed,green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
begin{document}
%starttext
begin{tikzpicture}
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
end{tikzpicture}
%stoptext
end{document}
Translated with www.DeepL.com/Translator
Thanks! I don't even remember how I ended up usingdraw=green
when justgreen
suffices.
– flyx
Nov 30 at 12:42
There are nearly a thousand different keys withTikZ
, so the extraordinary thing would be to not forget anything:-)
– AndréC
Nov 30 at 12:50
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
According to page 190 of the manual, stealth arrows are built according to a quadrilateral.
The < color > will apply both to any drawing and filling operations
used to construct the path. For instance, even though the Stealth
arrow tips looks like a filled quadrilateral, it is actually
constructed by drawing a quadrilateral and then filling it in the same
color as the drawing (see the fill option below to see the
difference).
But if you specify a color for the arrow with the draw
option, it is only its border that takes on this color. For it to fill
green, it must also be filled with green.
garr/.style = {arr, dashed,draw=green,fill=green},
Here, it is enough to indicate the color without specifying draw for it to also fill the arrow.
garr/.style = {arr, dashed,green},
here a solution with PDFLatex (I don't use Context, but it's the same).
documentclass{article}
usepackage{tikz}
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed,green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
begin{document}
%starttext
begin{tikzpicture}
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
end{tikzpicture}
%stoptext
end{document}
Translated with www.DeepL.com/Translator
According to page 190 of the manual, stealth arrows are built according to a quadrilateral.
The < color > will apply both to any drawing and filling operations
used to construct the path. For instance, even though the Stealth
arrow tips looks like a filled quadrilateral, it is actually
constructed by drawing a quadrilateral and then filling it in the same
color as the drawing (see the fill option below to see the
difference).
But if you specify a color for the arrow with the draw
option, it is only its border that takes on this color. For it to fill
green, it must also be filled with green.
garr/.style = {arr, dashed,draw=green,fill=green},
Here, it is enough to indicate the color without specifying draw for it to also fill the arrow.
garr/.style = {arr, dashed,green},
here a solution with PDFLatex (I don't use Context, but it's the same).
documentclass{article}
usepackage{tikz}
usetikzlibrary{positioning,fit,shapes,calc,arrows.meta,decorations.markings}
tikzset{
arr/.style = { -{Stealth[width=2mm]} },
garr/.style = {arr, dashed,green},
cflow/.style={draw=black,ellipse,text centered,minimum width=1cm}
}
begin{document}
%starttext
begin{tikzpicture}
node[cflow] (A) {A};
node[cflow,right=of A] (E) {E};
node[cflow,below right=.35cm and 1.4cm of E] (B) {B};
path[arr]
(A) edge (E)
(E) edge (B);
path[garr]
(A) edge[bend right] (B);
end{tikzpicture}
%stoptext
end{document}
Translated with www.DeepL.com/Translator
answered Nov 30 at 12:33
AndréC
6,62711140
6,62711140
Thanks! I don't even remember how I ended up usingdraw=green
when justgreen
suffices.
– flyx
Nov 30 at 12:42
There are nearly a thousand different keys withTikZ
, so the extraordinary thing would be to not forget anything:-)
– AndréC
Nov 30 at 12:50
add a comment |
Thanks! I don't even remember how I ended up usingdraw=green
when justgreen
suffices.
– flyx
Nov 30 at 12:42
There are nearly a thousand different keys withTikZ
, so the extraordinary thing would be to not forget anything:-)
– AndréC
Nov 30 at 12:50
Thanks! I don't even remember how I ended up using
draw=green
when just green
suffices.– flyx
Nov 30 at 12:42
Thanks! I don't even remember how I ended up using
draw=green
when just green
suffices.– flyx
Nov 30 at 12:42
There are nearly a thousand different keys with
TikZ
, so the extraordinary thing would be to not forget anything:-)– AndréC
Nov 30 at 12:50
There are nearly a thousand different keys with
TikZ
, so the extraordinary thing would be to not forget anything:-)– AndréC
Nov 30 at 12:50
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462552%2ftikz-arrow-tip-is-drawn-with-two-colors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown