graphs in latexHow 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”
Do you "gain" 1st level?
How to gracefully leave a company you helped start?
A trip to the library
When was "Fredo" an insult to Italian-Americans?
Does an Irish VISA WARNING count as "refused entry at the border of any country other than the UK?"
Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?
Causal Diagrams using Wolfram?
Why did IBM make the PC BIOS source code public?
What is the most difficult concept to grasp in Calculus 1?
What should we do with manuals from the 80s?
Did Pope Urban II issue the papal bull "terra nullius" in 1095?
Co-workers with a lot of money and openly talk about it
Why does the cable resistance jump from a low value to high value at a particular frequency?
Graphs for which a calculus student can reasonably compute the arclength
Is this n-speak?
What should I do if actually I found a serious flaw in someone's PhD thesis and an article derived from that PhD thesis?
How can I find an old paper when the usual methods fail?
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
In which case does the Security misconfiguration vulnerability apply to?
Why not demand President's/candidate's financial records instead of tax returns?
Why command hierarchy, if the chain of command is standing next to each other?
What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?
Are there really no countries that protect Freedom of Speech as the United States does?
Boss wants me to ignore a software API license
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.
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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$
endpicture
endfigure
diagrams picture-mode
New contributor
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.
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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$
endpicture
endfigure
diagrams picture-mode
New contributor
1
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
9 hours 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.
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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$
endpicture
endfigure
diagrams picture-mode
New contributor
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.
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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$
endpicture
endfigure
diagrams picture-mode
diagrams picture-mode
New contributor
New contributor
edited 9 hours ago
Torbjørn T.
164k13 gold badges268 silver badges454 bronze badges
164k13 gold badges268 silver badges454 bronze badges
New contributor
asked 9 hours ago
janejane
161 bronze badge
161 bronze badge
New contributor
New contributor
1
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
9 hours ago
add a comment |
1
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
9 hours ago
1
1
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
9 hours 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
9 hours 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
tikzsetevery label/.append style = draw, inner sep=2pt
begindocument
beginforest
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$]
]
endforest
enddocument
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclassarticle
usepackagepict2e
begindocument
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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)
endpicture
endfigure
enddocument
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours 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
);
);
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
tikzsetevery label/.append style = draw, inner sep=2pt
begindocument
beginforest
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$]
]
endforest
enddocument
add a comment |
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]standalone
usepackage[edges]forest
tikzsetevery label/.append style = draw, inner sep=2pt
begindocument
beginforest
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$]
]
endforest
enddocument
add a comment |
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]standalone
usepackage[edges]forest
tikzsetevery label/.append style = draw, inner sep=2pt
begindocument
beginforest
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$]
]
endforest
enddocument
Like this?
with forest
and using nodes' labels is simple:
documentclass[border=1cm]standalone
usepackage[edges]forest
tikzsetevery label/.append style = draw, inner sep=2pt
begindocument
beginforest
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$]
]
endforest
enddocument
edited 8 hours ago
answered 8 hours ago
ZarkoZarko
143k8 gold badges80 silver badges192 bronze badges
143k8 gold badges80 silver badges192 bronze badges
add a comment |
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclassarticle
usepackagepict2e
begindocument
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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)
endpicture
endfigure
enddocument
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours ago
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclassarticle
usepackagepict2e
begindocument
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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)
endpicture
endfigure
enddocument
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours ago
add a comment |
With pict2e
you can easily draw segments specifying their end points.
documentclassarticle
usepackagepict2e
begindocument
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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)
endpicture
endfigure
enddocument
With pict2e
you can easily draw segments specifying their end points.
documentclassarticle
usepackagepict2e
begindocument
beginfigure
setlengthunitlength0.06in
centering
beginpicture(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)
endpicture
endfigure
enddocument
answered 8 hours ago
egregegreg
762k90 gold badges1991 silver badges3339 bronze badges
762k90 gold badges1991 silver badges3339 bronze badges
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours ago
add a comment |
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours ago
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours ago
Thanks, it was exactly what I was looking for. It works perfect.
– jane
7 hours ago
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
1
Switch to the tikz ecosystem immediately, the picture env is not worth spending time on. It even have cool libraries for drawing trees
– daleif
9 hours ago