Position a graph in tikz

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question







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 the graph operation here when you can use the nodes 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














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.










share|improve this question







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 the graph operation here when you can use the nodes 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












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.










share|improve this question







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






share|improve this question







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.











share|improve this question







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.









share|improve this question




share|improve this question






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 the graph operation here when you can use the nodes 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
















  • 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




    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















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










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


enter image description here






share|improve this answer






















  • 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




    @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




    Per my manual reading, I think the positioning of graph inside a path should work. This might be a bug.
    – user170268
    21 hours 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
);



);






user170268 is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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






























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


enter image description here






share|improve this answer






















  • 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




    @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




    Per my manual reading, I think the positioning of graph inside a path should work. This might be a bug.
    – user170268
    21 hours ago














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


enter image description here






share|improve this answer






















  • 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




    @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




    Per my manual reading, I think the positioning of graph inside a path should work. This might be a bug.
    – user170268
    21 hours ago












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


enter image description here






share|improve this answer














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


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









marmot

56.9k462124




56.9k462124











  • 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




    @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




    Per my manual reading, I think the positioning of graph 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







  • 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







  • 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















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










user170268 is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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.













 


draft saved


draft discarded














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













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery