Tikz positioning above circle exact alignmentHow to have one straight arrows surrounded by two curved arrows (TikZ)How to define the default vertical distance between nodes?Computing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?use circuitikz picture inside tikzpictureTikZ: Drawing an arc from an intersection to an intersectionAdjusting edge alignment and positioning of fitted nodeDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themPositioning of Node Labels

Why is the origin of “threshold” uncertain?

Sci-fi novel series with instant travel between planets through gates. A river runs through the gates

Why do computer-science majors learn calculus?

What does "rf" mean in "rfkill"?

Python "triplet" dictionary?

What's the metal clinking sound at the end of credits in Avengers: Endgame?

When and why did journal article titles become descriptive, rather than creatively allusive?

Find the coordinate of two line segments that are perpendicular

How does a Swashbuckler rogue "fight with two weapons while safely darting away"?

Packing rectangles: Does rotation ever help?

Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?

Was it really necessary for the Lunar Module to have 2 stages?

Toggle Overlays shortcut?

Does jamais mean always or never in this context?

TikZ how to make supply and demand arrows for nodes?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Were there two appearances of Stan Lee?

Why does nature favour the Laplacian?

Please, smoke with good manners

What are the spoon bit of a spoon and fork bit of a fork called?

Is it possible to Ready a spell to be cast just before the start of your next turn by having the trigger be an ally's attack?

Single Colour Mastermind Problem

Why do TACANs not have a symbol for compulsory reporting?

Past Perfect Tense



Tikz positioning above circle exact alignment


How to have one straight arrows surrounded by two curved arrows (TikZ)How to define the default vertical distance between nodes?Computing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?use circuitikz picture inside tikzpictureTikZ: Drawing an arc from an intersection to an intersectionAdjusting edge alignment and positioning of fitted nodeDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themPositioning of Node Labels













4















How can the balls b1 and b2 be aligned exactly above each other? Also, above=1cm of b1.center, anchor=center and all kinds of combinations with north - south, north east - south west does not yield the desired result.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

beginscope[]
matrix[nodes=draw, ball]
node (b1) b1; &
node (b2) [above=.1cm of b1] b2; \
;
endscope
endtikzpicture
enddocument


enter image description here










share|improve this question









New contributor




AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • (1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem the matrix is the right tool to use here.

    – daleif
    Apr 25 at 10:26















4















How can the balls b1 and b2 be aligned exactly above each other? Also, above=1cm of b1.center, anchor=center and all kinds of combinations with north - south, north east - south west does not yield the desired result.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

beginscope[]
matrix[nodes=draw, ball]
node (b1) b1; &
node (b2) [above=.1cm of b1] b2; \
;
endscope
endtikzpicture
enddocument


enter image description here










share|improve this question









New contributor




AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • (1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem the matrix is the right tool to use here.

    – daleif
    Apr 25 at 10:26













4












4








4








How can the balls b1 and b2 be aligned exactly above each other? Also, above=1cm of b1.center, anchor=center and all kinds of combinations with north - south, north east - south west does not yield the desired result.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

beginscope[]
matrix[nodes=draw, ball]
node (b1) b1; &
node (b2) [above=.1cm of b1] b2; \
;
endscope
endtikzpicture
enddocument


enter image description here










share|improve this question









New contributor




AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












How can the balls b1 and b2 be aligned exactly above each other? Also, above=1cm of b1.center, anchor=center and all kinds of combinations with north - south, north east - south west does not yield the desired result.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

beginscope[]
matrix[nodes=draw, ball]
node (b1) b1; &
node (b2) [above=.1cm of b1] b2; \
;
endscope
endtikzpicture
enddocument


enter image description here







tikz-pgf






share|improve this question









New contributor




AKG 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




AKG 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








edited Apr 25 at 11:31







AKG













New contributor




AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 25 at 10:15









AKGAKG

304




304




New contributor




AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






AKG is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • (1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem the matrix is the right tool to use here.

    – daleif
    Apr 25 at 10:26

















  • (1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem the matrix is the right tool to use here.

    – daleif
    Apr 25 at 10:26
















(1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem the matrix is the right tool to use here.

– daleif
Apr 25 at 10:26





(1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem the matrix is the right tool to use here.

– daleif
Apr 25 at 10:26










1 Answer
1






active

oldest

votes


















5














Your code with the matrix is not correct because your nodes are on same row, they are separated by & and there is only one \ in your matrix.



If you want to use a matrix, I propose following code which loads matrix library and uses a matrix of nodes to simplify syntax.



But I think second solution is better, just use above=0pt of ... and you'll get two nodes one above the other.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning, matrix
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

matrix[matrix of nodes, nodes=draw, ball, row sep=0pt]
b2\
b1\
;

endtikzpicture

begintikzpicture
node[ball] (b1) b1;
node[ball, above=0pt of b1] (b2) b2;
endtikzpicture
enddocument


enter image description here






share|improve this answer























  • I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

    – AKG
    Apr 25 at 11:30











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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






AKG 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%2f487536%2ftikz-positioning-above-circle-exact-alignment%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














Your code with the matrix is not correct because your nodes are on same row, they are separated by & and there is only one \ in your matrix.



If you want to use a matrix, I propose following code which loads matrix library and uses a matrix of nodes to simplify syntax.



But I think second solution is better, just use above=0pt of ... and you'll get two nodes one above the other.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning, matrix
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

matrix[matrix of nodes, nodes=draw, ball, row sep=0pt]
b2\
b1\
;

endtikzpicture

begintikzpicture
node[ball] (b1) b1;
node[ball, above=0pt of b1] (b2) b2;
endtikzpicture
enddocument


enter image description here






share|improve this answer























  • I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

    – AKG
    Apr 25 at 11:30















5














Your code with the matrix is not correct because your nodes are on same row, they are separated by & and there is only one \ in your matrix.



If you want to use a matrix, I propose following code which loads matrix library and uses a matrix of nodes to simplify syntax.



But I think second solution is better, just use above=0pt of ... and you'll get two nodes one above the other.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning, matrix
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

matrix[matrix of nodes, nodes=draw, ball, row sep=0pt]
b2\
b1\
;

endtikzpicture

begintikzpicture
node[ball] (b1) b1;
node[ball, above=0pt of b1] (b2) b2;
endtikzpicture
enddocument


enter image description here






share|improve this answer























  • I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

    – AKG
    Apr 25 at 11:30













5












5








5







Your code with the matrix is not correct because your nodes are on same row, they are separated by & and there is only one \ in your matrix.



If you want to use a matrix, I propose following code which loads matrix library and uses a matrix of nodes to simplify syntax.



But I think second solution is better, just use above=0pt of ... and you'll get two nodes one above the other.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning, matrix
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

matrix[matrix of nodes, nodes=draw, ball, row sep=0pt]
b2\
b1\
;

endtikzpicture

begintikzpicture
node[ball] (b1) b1;
node[ball, above=0pt of b1] (b2) b2;
endtikzpicture
enddocument


enter image description here






share|improve this answer













Your code with the matrix is not correct because your nodes are on same row, they are separated by & and there is only one \ in your matrix.



If you want to use a matrix, I propose following code which loads matrix library and uses a matrix of nodes to simplify syntax.



But I think second solution is better, just use above=0pt of ... and you'll get two nodes one above the other.



documentclass[tikz, margin=1pt]standalone
usetikzlibrarypositioning, matrix
tikzsetball/.style=draw, circle, minimum size=.1cm

begindocument
begintikzpicture

matrix[matrix of nodes, nodes=draw, ball, row sep=0pt]
b2\
b1\
;

endtikzpicture

begintikzpicture
node[ball] (b1) b1;
node[ball, above=0pt of b1] (b2) b2;
endtikzpicture
enddocument


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 25 at 10:55









IgnasiIgnasi

96.4k5177324




96.4k5177324












  • I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

    – AKG
    Apr 25 at 11:30

















  • I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

    – AKG
    Apr 25 at 11:30
















I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

– AKG
Apr 25 at 11:30





I want to finally make a grid of balls that is why I used matrix in the first place. I just reduced it to the essential part for the MWE.

– AKG
Apr 25 at 11:30










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









draft saved

draft discarded


















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












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











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














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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487536%2ftikz-positioning-above-circle-exact-alignment%23new-answer', 'question_page');

);

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







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form