How to make all circles in this example have the same radii?
The nodes with less than 4 digits appear smaller. I'd like to have them all of the same size and I can't seem to understand enough of the documentation to get it right. Feel free to suggest me a better way to do this. I'd love to be able to define a function $f(x) = x^2 + 8 mod 3127$ with $x_0 = 2$ which is where these numbers come from.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
tikz-pgf
add a comment |
The nodes with less than 4 digits appear smaller. I'd like to have them all of the same size and I can't seem to understand enough of the documentation to get it right. Feel free to suggest me a better way to do this. I'd love to be able to define a function $f(x) = x^2 + 8 mod 3127$ with $x_0 = 2$ which is where these numbers come from.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
tikz-pgf
What you want is to control the node size.
– Sigur
1 hour ago
add a comment |
The nodes with less than 4 digits appear smaller. I'd like to have them all of the same size and I can't seem to understand enough of the documentation to get it right. Feel free to suggest me a better way to do this. I'd love to be able to define a function $f(x) = x^2 + 8 mod 3127$ with $x_0 = 2$ which is where these numbers come from.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
tikz-pgf
The nodes with less than 4 digits appear smaller. I'd like to have them all of the same size and I can't seem to understand enough of the documentation to get it right. Feel free to suggest me a better way to do this. I'd love to be able to define a function $f(x) = x^2 + 8 mod 3127$ with $x_0 = 2$ which is where these numbers come from.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
tikz-pgf
tikz-pgf
edited 1 hour ago
Joep Awinita
asked 1 hour ago
Joep AwinitaJoep Awinita
11
11
What you want is to control the node size.
– Sigur
1 hour ago
add a comment |
What you want is to control the node size.
– Sigur
1 hour ago
What you want is to control the node size.
– Sigur
1 hour ago
What you want is to control the node size.
– Sigur
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
What you wish is to control the node size. So, you can use minimum width
. For example:
In this case, you don't need to write [draw, circle]
all the time.
(Also, consider using foreach
.)
MWE
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[every node/.style={circle,draw,minimum width=1.2cm}]
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
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
});
}
});
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%2f469160%2fhow-to-make-all-circles-in-this-example-have-the-same-radii%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
What you wish is to control the node size. So, you can use minimum width
. For example:
In this case, you don't need to write [draw, circle]
all the time.
(Also, consider using foreach
.)
MWE
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[every node/.style={circle,draw,minimum width=1.2cm}]
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
add a comment |
What you wish is to control the node size. So, you can use minimum width
. For example:
In this case, you don't need to write [draw, circle]
all the time.
(Also, consider using foreach
.)
MWE
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[every node/.style={circle,draw,minimum width=1.2cm}]
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
add a comment |
What you wish is to control the node size. So, you can use minimum width
. For example:
In this case, you don't need to write [draw, circle]
all the time.
(Also, consider using foreach
.)
MWE
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[every node/.style={circle,draw,minimum width=1.2cm}]
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
What you wish is to control the node size. So, you can use minimum width
. For example:
In this case, you don't need to write [draw, circle]
all the time.
(Also, consider using foreach
.)
MWE
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[every node/.style={circle,draw,minimum width=1.2cm}]
def n {11}
def radius {3.5cm}
def margin {10}
def s {1}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$456$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {2}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1562$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {3}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$792$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {4}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$1872$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {5}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2152$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {6}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$25$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {7}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$441$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {8}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$615$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {9}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2993$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {10}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2329$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
def s {11}
node[draw, circle] at ({360/n * (s - 1)}:radius) {$2031$};
draw[<-, >=latex] ({360/n * (s - 1)+margin}:radius)
arc ({360/n * (s - 1)+margin}:{360/n * (s)-margin}:radius);
end{tikzpicture}
end{document}
answered 1 hour ago
SigurSigur
24.2k355137
24.2k355137
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f469160%2fhow-to-make-all-circles-in-this-example-have-the-same-radii%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
What you want is to control the node size.
– Sigur
1 hour ago