Tikz: issue when combining arcs and arrows?
up vote
2
down vote
favorite
While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.
documentclass{standalone}
usepackage{tikz}
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
tikz-pgf arc
add a comment |
up vote
2
down vote
favorite
While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.
documentclass{standalone}
usepackage{tikz}
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
tikz-pgf arc
1
Interesting. It is even worse if you uselatex-latex
instead of<->
.
– Peter Grill
yesterday
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.
documentclass{standalone}
usepackage{tikz}
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
tikz-pgf arc
While editing my answer concerning centered arcs with Tikz, I realized that there might be an issue when arrows are created: the piece of arc is slightly distorted. This disappears for "normal" arcs.
documentclass{standalone}
usepackage{tikz}
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->,blue](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
tikz-pgf arc
tikz-pgf arc
asked 2 days ago
pluton
7,885960129
7,885960129
1
Interesting. It is even worse if you uselatex-latex
instead of<->
.
– Peter Grill
yesterday
add a comment |
1
Interesting. It is even worse if you uselatex-latex
instead of<->
.
– Peter Grill
yesterday
1
1
Interesting. It is even worse if you use
latex-latex
instead of <->
.– Peter Grill
yesterday
Interesting. It is even worse if you use
latex-latex
instead of <->
.– Peter Grill
yesterday
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
better rendering provides use of tikz library arrows.meta
with help of bending
:
documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
from tikz & pgf manual:
"Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and- "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
add many small line segments to paths. The important point is that if this first segment is very small,
namely smaller that the arrow tip itself, strange things may result."
so essentially we have to callusetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
better rendering provides use of tikz library arrows.meta
with help of bending
:
documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
from tikz & pgf manual:
"Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and- "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
add many small line segments to paths. The important point is that if this first segment is very small,
namely smaller that the arrow tip itself, strange things may result."
so essentially we have to callusetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
add a comment |
up vote
2
down vote
accepted
better rendering provides use of tikz library arrows.meta
with help of bending
:
documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
from tikz & pgf manual:
"Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and- "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
add many small line segments to paths. The important point is that if this first segment is very small,
namely smaller that the arrow tip itself, strange things may result."
so essentially we have to callusetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
better rendering provides use of tikz library arrows.meta
with help of bending
:
documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
from tikz & pgf manual:
"Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and- "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
add many small line segments to paths. The important point is that if this first segment is very small,
namely smaller that the arrow tip itself, strange things may result."
better rendering provides use of tikz library arrows.meta
with help of bending
:
documentclass[tikz, margin=3.141592mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows.meta,bending} % <--- added
defcenterarc[#1](#2)(#3:#4:#5);%
%Syntax: [draw options] (center) (initial angle:final angle:radius)
{
draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
begin{document}
begin{tikzpicture}[>=stealth]
draw[help lines] (0,0) grid (2,2);
centerarc[thick,<->, semitransparent,red](1,1)(70:195:1cm);
centerarc[thick,blue](1,1)(-90:25:1cm);
draw[thin,dashed,blue] (1,1) circle (1cm);
end{tikzpicture}
end{document}
from tikz & pgf manual:
"Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more ...", and- "One common pitfall when arrow tips are added to a path should be addressed right here at the beginning:
When TikZ positions an arrow tip at the start, for all its computations it only takes into account the first
segment of the subpath to which the arrow tip is added. This “first segment” is the first line-to or curve-to
operation (or arc or parabola or a similar operation) of the path; but note that decorations like snake will
add many small line segments to paths. The important point is that if this first segment is very small,
namely smaller that the arrow tip itself, strange things may result."
edited yesterday
answered yesterday
Zarko
116k865154
116k865154
so essentially we have to callusetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
add a comment |
so essentially we have to callusetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.
– pluton
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
so essentially we have to call
usetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.– pluton
yesterday
so essentially we have to call
usetikzlibrary{arrows.meta,bending}
as soon as arrows are drawn. Looks a bit heavy but that's ok.– pluton
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
@pluton, as i said in answer :-). from tikz & pgf manual: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries offered, plus much more. ...
– Zarko
yesterday
add a comment |
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%2f460885%2ftikz-issue-when-combining-arcs-and-arrows%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
1
Interesting. It is even worse if you use
latex-latex
instead of<->
.– Peter Grill
yesterday