Tikz positioning above circle exact alignment Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraHow 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 must Chinese maps be obfuscated?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
finding a tangent line to a parabola
How to translate "red flag" into Spanish?
Is Bran literally the world's memory?
Is Diceware more secure than a long passphrase?
Implementing 3DES algorithm in Java: is my code secure?
Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?
Is there any pythonic way to find average of specific tuple elements in array?
std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?
Intern got a job offer for same salary than a long term team member
Crossed out red box fitting tightly around image
What *exactly* is electrical current, voltage, and resistance?
What is this word supposed to be?
Why doesn't the standard consider a template constructor as a copy constructor?
Does Feeblemind produce an ongoing magical effect that can be dispelled?
Is Electric Central Heating worth it if using Solar Panels?
Has a Nobel Peace laureate ever been accused of war crimes?
Retract an already submitted recommendation letter (written for an undergrad student)
What is the ongoing value of the Kanban board to the developers as opposed to management
My admission is revoked after accepting the admission offer
Raising a bilingual kid. When should we introduce the majority language?
Putting Ant-Man on house arrest
Is accepting an invalid credit card number a security issue?
Tikz positioning above circle exact alignment
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow 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
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
tikz-pgf
New contributor
add a comment |
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
tikz-pgf
New contributor
(1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem thematrix
is the right tool to use here.
– daleif
2 hours ago
add a comment |
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
tikz-pgf
New contributor
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
tikz-pgf
tikz-pgf
New contributor
New contributor
edited 1 hour ago
AKG
New contributor
asked 2 hours ago
AKGAKG
304
304
New contributor
New contributor
(1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem thematrix
is the right tool to use here.
– daleif
2 hours ago
add a comment |
(1) welcome, (2) you might want to explain in more detail what your end goals is here. To me it does not seem thematrix
is the right tool to use here.
– daleif
2 hours ago
(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
2 hours ago
(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
2 hours ago
add a comment |
1 Answer
1
active
oldest
votes
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
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
1 hour ago
add a comment |
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.
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%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
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
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
1 hour ago
add a comment |
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
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
1 hour ago
add a comment |
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
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
answered 2 hours ago
IgnasiIgnasi
96.3k5176323
96.3k5176323
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
1 hour ago
add a comment |
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
1 hour ago
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
1 hour ago
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
1 hour ago
add a comment |
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.
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.
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%2f487536%2ftikz-positioning-above-circle-exact-alignment%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) 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
2 hours ago