Stretch a Tikz tree
I have this beautiful tree, but I have not been able to stretch it. Specifically I want to increase the distance between the first and second children and their grandchildren. Any suggestions?
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
% edge path={
% noexpand path[forestoption{edge}]
% (.child anchor)
% -- +(-10pt,0)
% |- (!u.parent anchor)
% forestoption{edge label};
% },
% ver/.style={rotate=90, child anchor=north, parent anchor=south, anchor=center},
% }
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
tikz-pgf
add a comment |
I have this beautiful tree, but I have not been able to stretch it. Specifically I want to increase the distance between the first and second children and their grandchildren. Any suggestions?
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
% edge path={
% noexpand path[forestoption{edge}]
% (.child anchor)
% -- +(-10pt,0)
% |- (!u.parent anchor)
% forestoption{edge label};
% },
% ver/.style={rotate=90, child anchor=north, parent anchor=south, anchor=center},
% }
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
tikz-pgf
1
This distance is to a large extent controlled byl sep
. If you increase it to, sayl sep=1.55cm,
the distance will become larger. What precisely do you want to achieve?
– marmot
43 mins ago
Thanks marmot, I will like to strech the distance between the first/second child and grand child. Changing to 1.55cm only increases the distance of the grandchild not the connecting line between the first/second child and the grandchild
– Abdulhameed
15 mins ago
I added something where you can selectively increase (or decrease) these distances.
– marmot
8 mins ago
add a comment |
I have this beautiful tree, but I have not been able to stretch it. Specifically I want to increase the distance between the first and second children and their grandchildren. Any suggestions?
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
% edge path={
% noexpand path[forestoption{edge}]
% (.child anchor)
% -- +(-10pt,0)
% |- (!u.parent anchor)
% forestoption{edge label};
% },
% ver/.style={rotate=90, child anchor=north, parent anchor=south, anchor=center},
% }
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
tikz-pgf
I have this beautiful tree, but I have not been able to stretch it. Specifically I want to increase the distance between the first and second children and their grandchildren. Any suggestions?
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
% edge path={
% noexpand path[forestoption{edge}]
% (.child anchor)
% -- +(-10pt,0)
% |- (!u.parent anchor)
% forestoption{edge label};
% },
% ver/.style={rotate=90, child anchor=north, parent anchor=south, anchor=center},
% }
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
tikz-pgf
tikz-pgf
asked 52 mins ago
AbdulhameedAbdulhameed
29219
29219
1
This distance is to a large extent controlled byl sep
. If you increase it to, sayl sep=1.55cm,
the distance will become larger. What precisely do you want to achieve?
– marmot
43 mins ago
Thanks marmot, I will like to strech the distance between the first/second child and grand child. Changing to 1.55cm only increases the distance of the grandchild not the connecting line between the first/second child and the grandchild
– Abdulhameed
15 mins ago
I added something where you can selectively increase (or decrease) these distances.
– marmot
8 mins ago
add a comment |
1
This distance is to a large extent controlled byl sep
. If you increase it to, sayl sep=1.55cm,
the distance will become larger. What precisely do you want to achieve?
– marmot
43 mins ago
Thanks marmot, I will like to strech the distance between the first/second child and grand child. Changing to 1.55cm only increases the distance of the grandchild not the connecting line between the first/second child and the grandchild
– Abdulhameed
15 mins ago
I added something where you can selectively increase (or decrease) these distances.
– marmot
8 mins ago
1
1
This distance is to a large extent controlled by
l sep
. If you increase it to, say l sep=1.55cm,
the distance will become larger. What precisely do you want to achieve?– marmot
43 mins ago
This distance is to a large extent controlled by
l sep
. If you increase it to, say l sep=1.55cm,
the distance will become larger. What precisely do you want to achieve?– marmot
43 mins ago
Thanks marmot, I will like to strech the distance between the first/second child and grand child. Changing to 1.55cm only increases the distance of the grandchild not the connecting line between the first/second child and the grandchild
– Abdulhameed
15 mins ago
Thanks marmot, I will like to strech the distance between the first/second child and grand child. Changing to 1.55cm only increases the distance of the grandchild not the connecting line between the first/second child and the grandchild
– Abdulhameed
15 mins ago
I added something where you can selectively increase (or decrease) these distances.
– marmot
8 mins ago
I added something where you can selectively increase (or decrease) these distances.
– marmot
8 mins ago
add a comment |
2 Answers
2
active
oldest
votes
You can selectively increase the level distance by saying e.g.
where level=2{l+=0.5cm,fork sep=8mm}{},
where I also adjusted the fork sep
for the optics. MWE:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
where level=2{l+=0.5cm,fork sep=8mm}{},
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
add a comment |
i'm guessing, that you looking for something like this:
which is obtained with the following mwe:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
grow'=east,
anchor=west,
node options={draw, thick, font=sffamily},
edge={semithick},
forked edges,
l sep=6mm,
s sep=4mm,
fork sep = 2.5mm, % new, distance from parent to branching point
where level=1{s sep=1mm}{}, % new
where level=2{}{rotate=90, anchor=center} % new
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
changes in comparison to your mwe are indicated with % new
. i also remove all doubled code lines in your mwe.
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%2f487300%2fstretch-a-tikz-tree%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can selectively increase the level distance by saying e.g.
where level=2{l+=0.5cm,fork sep=8mm}{},
where I also adjusted the fork sep
for the optics. MWE:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
where level=2{l+=0.5cm,fork sep=8mm}{},
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
add a comment |
You can selectively increase the level distance by saying e.g.
where level=2{l+=0.5cm,fork sep=8mm}{},
where I also adjusted the fork sep
for the optics. MWE:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
where level=2{l+=0.5cm,fork sep=8mm}{},
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
add a comment |
You can selectively increase the level distance by saying e.g.
where level=2{l+=0.5cm,fork sep=8mm}{},
where I also adjusted the fork sep
for the optics. MWE:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
where level=2{l+=0.5cm,fork sep=8mm}{},
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
You can selectively increase the level distance by saying e.g.
where level=2{l+=0.5cm,fork sep=8mm}{},
where I also adjusted the fork sep
for the optics. MWE:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
thick,
l sep=0.55cm,
where level=2{l+=0.5cm,fork sep=8mm}{},
s sep=0.55cm,
child anchor=west,
parent anchor=east,
grow'=east,
draw,
anchor=west,
node options={draw,font=sffamily},
edge={semithick},
align=center,
node options={draw,font=sffamily},
edge={semithick},
forked edges,
where n children={11}{rotate=90, anchor=center}{},
where n children=2{rotate=90, anchor=center}{},
where n children=6{rotate=90, anchor=center}{},
where n children=8{rotate=90, anchor=center}{},
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
answered 9 mins ago
marmotmarmot
121k6158295
121k6158295
add a comment |
add a comment |
i'm guessing, that you looking for something like this:
which is obtained with the following mwe:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
grow'=east,
anchor=west,
node options={draw, thick, font=sffamily},
edge={semithick},
forked edges,
l sep=6mm,
s sep=4mm,
fork sep = 2.5mm, % new, distance from parent to branching point
where level=1{s sep=1mm}{}, % new
where level=2{}{rotate=90, anchor=center} % new
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
changes in comparison to your mwe are indicated with % new
. i also remove all doubled code lines in your mwe.
add a comment |
i'm guessing, that you looking for something like this:
which is obtained with the following mwe:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
grow'=east,
anchor=west,
node options={draw, thick, font=sffamily},
edge={semithick},
forked edges,
l sep=6mm,
s sep=4mm,
fork sep = 2.5mm, % new, distance from parent to branching point
where level=1{s sep=1mm}{}, % new
where level=2{}{rotate=90, anchor=center} % new
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
changes in comparison to your mwe are indicated with % new
. i also remove all doubled code lines in your mwe.
add a comment |
i'm guessing, that you looking for something like this:
which is obtained with the following mwe:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
grow'=east,
anchor=west,
node options={draw, thick, font=sffamily},
edge={semithick},
forked edges,
l sep=6mm,
s sep=4mm,
fork sep = 2.5mm, % new, distance from parent to branching point
where level=1{s sep=1mm}{}, % new
where level=2{}{rotate=90, anchor=center} % new
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
changes in comparison to your mwe are indicated with % new
. i also remove all doubled code lines in your mwe.
i'm guessing, that you looking for something like this:
which is obtained with the following mwe:
documentclass[border=10pt]{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
grow'=east,
anchor=west,
node options={draw, thick, font=sffamily},
edge={semithick},
forked edges,
l sep=6mm,
s sep=4mm,
fork sep = 2.5mm, % new, distance from parent to branching point
where level=1{s sep=1mm}{}, % new
where level=2{}{rotate=90, anchor=center} % new
},
[Mother branch,
[First Child
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
[Second Child
[Grand child [ ]]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
[Grand child ]
]
]
end{forest}
end{document}
changes in comparison to your mwe are indicated with % new
. i also remove all doubled code lines in your mwe.
edited 20 mins ago
answered 29 mins ago
ZarkoZarko
131k869170
131k869170
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.
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%2f487300%2fstretch-a-tikz-tree%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
This distance is to a large extent controlled by
l sep
. If you increase it to, sayl sep=1.55cm,
the distance will become larger. What precisely do you want to achieve?– marmot
43 mins ago
Thanks marmot, I will like to strech the distance between the first/second child and grand child. Changing to 1.55cm only increases the distance of the grandchild not the connecting line between the first/second child and the grandchild
– Abdulhameed
15 mins ago
I added something where you can selectively increase (or decrease) these distances.
– marmot
8 mins ago