graphs in latexHow do I draw bar graphs in my LaTeX documents?Bipartite graphsDrawing graphs in LaTeXDirected...
Is Thieves' Cant a language?
Deciphering Lunacy Asylum case notes about administering Brandy and Milk
Solving pricing problem heuristically in column generation algorithm for VRP
Source that you can't tell your wife not to lend to others
Is the Microsoft recommendation to use C# properties applicable to game development?
Is there a word for returning to unpreparedness?
What is a "soap"?
Airline power sockets shut down when I plug my computer in. How can I avoid that?
Escape Velocity - Won't the orbital path just become larger with higher initial velocity?
What if a restaurant suddenly cannot accept credit cards, and the customer has no cash?
Visa on arrival to exit airport in Russia
How to get locks that are keyed alike?
What allows us to use imaginary numbers?
Is this bar slide trick shown on Cheers real or a visual effect?
Heyawake: An Introductory Puzzle
What is the hottest thing in the universe?
Why don't modern jet engines use forced exhaust mixing?
Can anybody tell me who this Pokemon is?
Mind ya, it's Homophones Everywhere!
Tridion Event System with specific User
If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?
What are the advantages of this gold finger shape?
How can I find an old paper when the usual methods fail?
When was "Fredo" an insult to Italian-Americans?
graphs in latex
How do I draw bar graphs in my LaTeX documents?Bipartite graphsDrawing graphs in LaTeXDirected graphsDrawing undirected graphs in LaTeXGraphs/Charts in LatexDrawing graphs in Latex using documentclass “memoir”
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am trying to build some kind of a tree, but in its node instead of a symbol I want to put a framebox. Also, in that framebox at a specific position I want an other framebox. While I couldn't find a way to use the tree structure that exists in latex in order to do so, I started putting frameboxes at the positions that I wanted. Thus, I built the following, but now I don't know how too draw a line that connects each bi to the s.
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
end{picture}
end{figure}
diagrams picture-mode
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I am trying to build some kind of a tree, but in its node instead of a symbol I want to put a framebox. Also, in that framebox at a specific position I want an other framebox. While I couldn't find a way to use the tree structure that exists in latex in order to do so, I started putting frameboxes at the positions that I wanted. Thus, I built the following, but now I don't know how too draw a line that connects each bi to the s.
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
end{picture}
end{figure}
diagrams picture-mode
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
2 days ago
add a comment |
I am trying to build some kind of a tree, but in its node instead of a symbol I want to put a framebox. Also, in that framebox at a specific position I want an other framebox. While I couldn't find a way to use the tree structure that exists in latex in order to do so, I started putting frameboxes at the positions that I wanted. Thus, I built the following, but now I don't know how too draw a line that connects each bi to the s.
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
end{picture}
end{figure}
diagrams picture-mode
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am trying to build some kind of a tree, but in its node instead of a symbol I want to put a framebox. Also, in that framebox at a specific position I want an other framebox. While I couldn't find a way to use the tree structure that exists in latex in order to do so, I started putting frameboxes at the positions that I wanted. Thus, I built the following, but now I don't know how too draw a line that connects each bi to the s.
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
end{picture}
end{figure}
diagrams picture-mode
diagrams picture-mode
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 days ago
Torbjørn T.
164k13 gold badges268 silver badges454 bronze badges
164k13 gold badges268 silver badges454 bronze badges
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
janejane
161 bronze badge
161 bronze badge
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
jane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
2 days ago
add a comment |
3
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
2 days ago
3
3
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
2 days ago
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]{standalone}
usepackage[edges]{forest}
tikzset{every label/.append style = {draw, inner sep=2pt}}
begin{document}
begin{forest}
for tree = {
draw,
text width=22mm, minimum height=16mm,
font=Large,
text centered,
parent anchor=south,
child anchor=north,
%
l sep=8mm,
s sep=6mm,
}
[server, label={[anchor=south]below:s}
[browser 1, label={[anchor=north]:$b_1$}]
[browser 2, label={[anchor=north]:$b_2$}]
[browser 3, label={[anchor=north]:$b_3$}]
]
end{forest}
end{document}
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclass{article}
usepackage{pict2e}
begin{document}
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
Line(7,15)(32,35)
Line(32,15)(32,35)
Line(57,15)(32,35)
end{picture}
end{figure}
end{document}
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
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
});
}
});
jane 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%2f504210%2fgraphs-in-latex%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
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]{standalone}
usepackage[edges]{forest}
tikzset{every label/.append style = {draw, inner sep=2pt}}
begin{document}
begin{forest}
for tree = {
draw,
text width=22mm, minimum height=16mm,
font=Large,
text centered,
parent anchor=south,
child anchor=north,
%
l sep=8mm,
s sep=6mm,
}
[server, label={[anchor=south]below:s}
[browser 1, label={[anchor=north]:$b_1$}]
[browser 2, label={[anchor=north]:$b_2$}]
[browser 3, label={[anchor=north]:$b_3$}]
]
end{forest}
end{document}
add a comment |
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]{standalone}
usepackage[edges]{forest}
tikzset{every label/.append style = {draw, inner sep=2pt}}
begin{document}
begin{forest}
for tree = {
draw,
text width=22mm, minimum height=16mm,
font=Large,
text centered,
parent anchor=south,
child anchor=north,
%
l sep=8mm,
s sep=6mm,
}
[server, label={[anchor=south]below:s}
[browser 1, label={[anchor=north]:$b_1$}]
[browser 2, label={[anchor=north]:$b_2$}]
[browser 3, label={[anchor=north]:$b_3$}]
]
end{forest}
end{document}
add a comment |
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]{standalone}
usepackage[edges]{forest}
tikzset{every label/.append style = {draw, inner sep=2pt}}
begin{document}
begin{forest}
for tree = {
draw,
text width=22mm, minimum height=16mm,
font=Large,
text centered,
parent anchor=south,
child anchor=north,
%
l sep=8mm,
s sep=6mm,
}
[server, label={[anchor=south]below:s}
[browser 1, label={[anchor=north]:$b_1$}]
[browser 2, label={[anchor=north]:$b_2$}]
[browser 3, label={[anchor=north]:$b_3$}]
]
end{forest}
end{document}
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]{standalone}
usepackage[edges]{forest}
tikzset{every label/.append style = {draw, inner sep=2pt}}
begin{document}
begin{forest}
for tree = {
draw,
text width=22mm, minimum height=16mm,
font=Large,
text centered,
parent anchor=south,
child anchor=north,
%
l sep=8mm,
s sep=6mm,
}
[server, label={[anchor=south]below:s}
[browser 1, label={[anchor=north]:$b_1$}]
[browser 2, label={[anchor=north]:$b_2$}]
[browser 3, label={[anchor=north]:$b_3$}]
]
end{forest}
end{document}
edited yesterday
answered 2 days ago
ZarkoZarko
144k8 gold badges81 silver badges192 bronze badges
144k8 gold badges81 silver badges192 bronze badges
add a comment |
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclass{article}
usepackage{pict2e}
begin{document}
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
Line(7,15)(32,35)
Line(32,15)(32,35)
Line(57,15)(32,35)
end{picture}
end{figure}
end{document}
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclass{article}
usepackage{pict2e}
begin{document}
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
Line(7,15)(32,35)
Line(32,15)(32,35)
Line(57,15)(32,35)
end{picture}
end{figure}
end{document}
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclass{article}
usepackage{pict2e}
begin{document}
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
Line(7,15)(32,35)
Line(32,15)(32,35)
Line(57,15)(32,35)
end{picture}
end{figure}
end{document}
With pict2e
you can easily draw segments specifying their end points.
documentclass{article}
usepackage{pict2e}
begin{document}
begin{figure}
setlength{unitlength}{0.06in}
centering
begin{picture}(70,50)
put(25,35){framebox(14,10){Large server} }
put(0,5){framebox(14,10){Large browser 1}}
put(25,5){framebox(14,10){Large browser 2}}
put(50,5){framebox(14,10){Large browser 3}}
put(30.5,35){framebox(3,3){s}}
put(5.5,12){framebox(3,3){$b_1$}}
put(30.5,12){framebox(3,3){$b_2$}}
put(55.5,12) {framebox(3,3){$b_3$}}
Line(7,15)(32,35)
Line(32,15)(32,35)
Line(57,15)(32,35)
end{picture}
end{figure}
end{document}
answered yesterday


egregegreg
762k90 gold badges1992 silver badges3340 bronze badges
762k90 gold badges1992 silver badges3340 bronze badges
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
add a comment |
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
Thanks, it was exactly what I was looking for. It works perfect.
– jane
yesterday
add a comment |
jane is a new contributor. Be nice, and check out our Code of Conduct.
jane is a new contributor. Be nice, and check out our Code of Conduct.
jane is a new contributor. Be nice, and check out our Code of Conduct.
jane 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%2f504210%2fgraphs-in-latex%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
3
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
2 days ago