Position a graph in tikz
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
Shouldn't the following graph a
be positioned at node middle
?
documentclassarticle
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
node (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
endtikzpicture
enddocument
I read answer Position a graph in a tikz picture (relatively) but it isn't working as advertised.
tikz-pgf graphs
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
 |Â
show 1 more comment
up vote
5
down vote
favorite
Shouldn't the following graph a
be positioned at node middle
?
documentclassarticle
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
node (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
endtikzpicture
enddocument
I read answer Position a graph in a tikz picture (relatively) but it isn't working as advertised.
tikz-pgf graphs
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Why do you need to use thegraph
operation here when you can use thenodes
as well:path[draw] (middle) node a
?
– AndréC
yesterday
1
graph a
is just an example. Imagine a complex graph instead.
– user170268
21 hours ago
Okay, can you complete the question with this sample graph?
– AndréC
21 hours ago
1
I don't think the complexity of the graph is the issue here, but whygraph
isn't being positioned at the coordinate. This graph could be also generate inside a long path, and I would expect it to be positioned at the last specified coordinate.
– user170268
21 hours ago
1
I believe I wrote a minimal example. The issue isn't how to write this graph using nodes, but positioning graphs using coordinates.
– user170268
21 hours ago
 |Â
show 1 more comment
up vote
5
down vote
favorite
up vote
5
down vote
favorite
Shouldn't the following graph a
be positioned at node middle
?
documentclassarticle
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
node (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
endtikzpicture
enddocument
I read answer Position a graph in a tikz picture (relatively) but it isn't working as advertised.
tikz-pgf graphs
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Shouldn't the following graph a
be positioned at node middle
?
documentclassarticle
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
node (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
endtikzpicture
enddocument
I read answer Position a graph in a tikz picture (relatively) but it isn't working as advertised.
tikz-pgf graphs
tikz-pgf graphs
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked yesterday
user170268
383
383
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user170268 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Why do you need to use thegraph
operation here when you can use thenodes
as well:path[draw] (middle) node a
?
– AndréC
yesterday
1
graph a
is just an example. Imagine a complex graph instead.
– user170268
21 hours ago
Okay, can you complete the question with this sample graph?
– AndréC
21 hours ago
1
I don't think the complexity of the graph is the issue here, but whygraph
isn't being positioned at the coordinate. This graph could be also generate inside a long path, and I would expect it to be positioned at the last specified coordinate.
– user170268
21 hours ago
1
I believe I wrote a minimal example. The issue isn't how to write this graph using nodes, but positioning graphs using coordinates.
– user170268
21 hours ago
 |Â
show 1 more comment
Why do you need to use thegraph
operation here when you can use thenodes
as well:path[draw] (middle) node a
?
– AndréC
yesterday
1
graph a
is just an example. Imagine a complex graph instead.
– user170268
21 hours ago
Okay, can you complete the question with this sample graph?
– AndréC
21 hours ago
1
I don't think the complexity of the graph is the issue here, but whygraph
isn't being positioned at the coordinate. This graph could be also generate inside a long path, and I would expect it to be positioned at the last specified coordinate.
– user170268
21 hours ago
1
I believe I wrote a minimal example. The issue isn't how to write this graph using nodes, but positioning graphs using coordinates.
– user170268
21 hours ago
Why do you need to use the
graph
operation here when you can use the nodes
as well: path[draw] (middle) node a
?– AndréC
yesterday
Why do you need to use the
graph
operation here when you can use the nodes
as well: path[draw] (middle) node a
?– AndréC
yesterday
1
1
graph a
is just an example. Imagine a complex graph instead.– user170268
21 hours ago
graph a
is just an example. Imagine a complex graph instead.– user170268
21 hours ago
Okay, can you complete the question with this sample graph?
– AndréC
21 hours ago
Okay, can you complete the question with this sample graph?
– AndréC
21 hours ago
1
1
I don't think the complexity of the graph is the issue here, but why
graph
isn't being positioned at the coordinate. This graph could be also generate inside a long path, and I would expect it to be positioned at the last specified coordinate.– user170268
21 hours ago
I don't think the complexity of the graph is the issue here, but why
graph
isn't being positioned at the coordinate. This graph could be also generate inside a long path, and I would expect it to be positioned at the last specified coordinate.– user170268
21 hours ago
1
1
I believe I wrote a minimal example. The issue isn't how to write this graph using nodes, but positioning graphs using coordinates.
– user170268
21 hours ago
I believe I wrote a minimal example. The issue isn't how to write this graph using nodes, but positioning graphs using coordinates.
– user170268
21 hours ago
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
Welcome to TeX.SE! You are right, at least I confirm your observation. One thing that does work, though, is to use shift
, (Thanks to Andrew for pushing me. ;-)
- either in a scope (example
b
) - or just in the path (example
c
).
(I tried various options, compiled with pdflatex
or lualatex
with and without RequirePackageluatex85
, the result on my machine was always the same: the graph sat at the origin. Most likely I am missing something, otherwise that would be the first time I would see an answer by Torbjørn that is not 100% accurate, so I guess I am doing something stupid.)
documentclassarticle
%RequirePackageluatex85
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
coordinate (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
beginscope[shift=(middle)]
path[draw] graph b;
endscope
path[shift=(2,2)] graph c;
endtikzpicture
enddocument
Notice that you can avoid the use ofscope
entirely by usingpath[shift=(middle)] graph a;
. This is implicit in your answer, with the graphc
, but it's kind of hidden since your answer suggests that you need thescope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.
– Andrew
yesterday
1
@Andrew Yes, this is how my lowest examplec
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.
– marmot
yesterday
1
Per my manual reading, I think the positioning ofgraph
inside a path should work. This might be a bug.
– user170268
21 hours ago
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
Welcome to TeX.SE! You are right, at least I confirm your observation. One thing that does work, though, is to use shift
, (Thanks to Andrew for pushing me. ;-)
- either in a scope (example
b
) - or just in the path (example
c
).
(I tried various options, compiled with pdflatex
or lualatex
with and without RequirePackageluatex85
, the result on my machine was always the same: the graph sat at the origin. Most likely I am missing something, otherwise that would be the first time I would see an answer by Torbjørn that is not 100% accurate, so I guess I am doing something stupid.)
documentclassarticle
%RequirePackageluatex85
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
coordinate (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
beginscope[shift=(middle)]
path[draw] graph b;
endscope
path[shift=(2,2)] graph c;
endtikzpicture
enddocument
Notice that you can avoid the use ofscope
entirely by usingpath[shift=(middle)] graph a;
. This is implicit in your answer, with the graphc
, but it's kind of hidden since your answer suggests that you need thescope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.
– Andrew
yesterday
1
@Andrew Yes, this is how my lowest examplec
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.
– marmot
yesterday
1
Per my manual reading, I think the positioning ofgraph
inside a path should work. This might be a bug.
– user170268
21 hours ago
add a comment |Â
up vote
5
down vote
accepted
Welcome to TeX.SE! You are right, at least I confirm your observation. One thing that does work, though, is to use shift
, (Thanks to Andrew for pushing me. ;-)
- either in a scope (example
b
) - or just in the path (example
c
).
(I tried various options, compiled with pdflatex
or lualatex
with and without RequirePackageluatex85
, the result on my machine was always the same: the graph sat at the origin. Most likely I am missing something, otherwise that would be the first time I would see an answer by Torbjørn that is not 100% accurate, so I guess I am doing something stupid.)
documentclassarticle
%RequirePackageluatex85
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
coordinate (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
beginscope[shift=(middle)]
path[draw] graph b;
endscope
path[shift=(2,2)] graph c;
endtikzpicture
enddocument
Notice that you can avoid the use ofscope
entirely by usingpath[shift=(middle)] graph a;
. This is implicit in your answer, with the graphc
, but it's kind of hidden since your answer suggests that you need thescope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.
– Andrew
yesterday
1
@Andrew Yes, this is how my lowest examplec
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.
– marmot
yesterday
1
Per my manual reading, I think the positioning ofgraph
inside a path should work. This might be a bug.
– user170268
21 hours ago
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
Welcome to TeX.SE! You are right, at least I confirm your observation. One thing that does work, though, is to use shift
, (Thanks to Andrew for pushing me. ;-)
- either in a scope (example
b
) - or just in the path (example
c
).
(I tried various options, compiled with pdflatex
or lualatex
with and without RequirePackageluatex85
, the result on my machine was always the same: the graph sat at the origin. Most likely I am missing something, otherwise that would be the first time I would see an answer by Torbjørn that is not 100% accurate, so I guess I am doing something stupid.)
documentclassarticle
%RequirePackageluatex85
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
coordinate (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
beginscope[shift=(middle)]
path[draw] graph b;
endscope
path[shift=(2,2)] graph c;
endtikzpicture
enddocument
Welcome to TeX.SE! You are right, at least I confirm your observation. One thing that does work, though, is to use shift
, (Thanks to Andrew for pushing me. ;-)
- either in a scope (example
b
) - or just in the path (example
c
).
(I tried various options, compiled with pdflatex
or lualatex
with and without RequirePackageluatex85
, the result on my machine was always the same: the graph sat at the origin. Most likely I am missing something, otherwise that would be the first time I would see an answer by Torbjørn that is not 100% accurate, so I guess I am doing something stupid.)
documentclassarticle
%RequirePackageluatex85
usepackagetikz
usetikzlibrarygraphs
begindocument
begintikzpicture
draw[help lines] (0,0) grid (2,2);
coordinate (middle) at (1,1) ;
path[draw] (middle) circle (.5);
path[draw] (middle) graph a;
beginscope[shift=(middle)]
path[draw] graph b;
endscope
path[shift=(2,2)] graph c;
endtikzpicture
enddocument
edited yesterday
answered yesterday


marmot
56.9k462124
56.9k462124
Notice that you can avoid the use ofscope
entirely by usingpath[shift=(middle)] graph a;
. This is implicit in your answer, with the graphc
, but it's kind of hidden since your answer suggests that you need thescope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.
– Andrew
yesterday
1
@Andrew Yes, this is how my lowest examplec
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.
– marmot
yesterday
1
Per my manual reading, I think the positioning ofgraph
inside a path should work. This might be a bug.
– user170268
21 hours ago
add a comment |Â
Notice that you can avoid the use ofscope
entirely by usingpath[shift=(middle)] graph a;
. This is implicit in your answer, with the graphc
, but it's kind of hidden since your answer suggests that you need thescope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.
– Andrew
yesterday
1
@Andrew Yes, this is how my lowest examplec
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.
– marmot
yesterday
1
Per my manual reading, I think the positioning ofgraph
inside a path should work. This might be a bug.
– user170268
21 hours ago
Notice that you can avoid the use of
scope
entirely by using path[shift=(middle)] graph a;
. This is implicit in your answer, with the graph c
, but it's kind of hidden since your answer suggests that you need the scope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.– Andrew
yesterday
Notice that you can avoid the use of
scope
entirely by using path[shift=(middle)] graph a;
. This is implicit in your answer, with the graph c
, but it's kind of hidden since your answer suggests that you need the scope
environment. In fact, I posted this as a follow-up answer, which I just deleted, because I didn't notice this in your post.– Andrew
yesterday
1
1
@Andrew Yes, this is how my lowest example
c
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.– marmot
yesterday
@Andrew Yes, this is how my lowest example
c
works. I wrote ", or just use shift" to indicate that option. I will be happy to make it clearer. I am actually concerned that I am doing something stupid. so far I have never seen any answer by Torbjørn that was not 100% accurate, so I am not sure if my answer will stay.– marmot
yesterday
1
1
Per my manual reading, I think the positioning of
graph
inside a path should work. This might be a bug.– user170268
21 hours ago
Per my manual reading, I think the positioning of
graph
inside a path should work. This might be a bug.– user170268
21 hours ago
add a comment |Â
user170268 is a new contributor. Be nice, and check out our Code of Conduct.
user170268 is a new contributor. Be nice, and check out our Code of Conduct.
user170268 is a new contributor. Be nice, and check out our Code of Conduct.
user170268 is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450489%2fposition-a-graph-in-tikz%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Why do you need to use the
graph
operation here when you can use thenodes
as well:path[draw] (middle) node a
?– AndréC
yesterday
1
graph a
is just an example. Imagine a complex graph instead.– user170268
21 hours ago
Okay, can you complete the question with this sample graph?
– AndréC
21 hours ago
1
I don't think the complexity of the graph is the issue here, but why
graph
isn't being positioned at the coordinate. This graph could be also generate inside a long path, and I would expect it to be positioned at the last specified coordinate.– user170268
21 hours ago
1
I believe I wrote a minimal example. The issue isn't how to write this graph using nodes, but positioning graphs using coordinates.
– user170268
21 hours ago