Graphics, Figures & TablesTikz chain labels for nodes with includegraphics

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
megaflop
Posts: 2
Joined: Fri Dec 28, 2012 11:21 am

Tikz chain labels for nodes with includegraphics

Post by megaflop »

Hello everyone!
I'm trying to draw a network diagram using tikz and Cisco symbols.
I have the cisco symbols in the folder

Code: Select all

figs/Cisco/3015_eps/
When I use the following code:

Code: Select all

\usepackage{tikz}
\usetikzlibrary{chains}
\usetikzlibrary{positioning}
\usepackage{epstopdf}
\begin{tikzpicture}
[start chain=going right,diagram item/.style={on chain,join}]
\node[diagram item,label=Internet](Internet){\includegraphics[width=6pc]{figs/Cisco/3015_eps/cloud}};
\node[diagram item,label=Backbone](Backbone){\includegraphics[width=6pc]{figs/Cisco/3015_eps/netranger}};
\node[diagram item,label=BRAS](BRAS){\includegraphics[width=6pc]{figs/Cisco/3015_eps/router}};
\node[continue chain=going right,diagram item,label=AAA](AAA){\includegraphics[width=5pc]{figs/Cisco/3015_eps/pad}};
\node[continue chain=going below,diagram item,label=left:Switch](Switch){\includegraphics[width=6pc]{figs/Cisco/3015_eps/workgroup_switch}};
\node[diagram item,label=left:DSLAM](DSLAM){\includegraphics[width=4.5pc]{figs/Cisco/3015_eps/dslam}};
\node[diagram item,label=left:Filtre](Filtre){\includegraphics[width=1.5pc]{figs/Cisco/3015_eps/pad}};
\node[start branch=1 going right,diagram item,label=right:phone](Phone){\includegraphics[width=6pc]{figs/Cisco/3015_eps/phone}};
\node [diagram item,label=below:PC](PC){\includegraphics[width=6pc]{figs/Cisco/3015_eps/pc}};
\end{tikzpicture}
I attached the result to this post.
What I want to do is to put the switch (and everything that's beneath it) under the BRAS not under the AAA I can't figure out how to do it.
And of course the labels are misplaced I don't understand why.
Can someone help please ? :)
Attachments
Untitled-1.jpg
Untitled-1.jpg (53 KiB) Viewed 6884 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

megaflop
Posts: 2
Joined: Fri Dec 28, 2012 11:21 am

Tikz chain labels for nodes with includegraphics

Post by megaflop »

I forgot to mention that the Cisco icons could be found here http://www.cisco.com/web/about/ac50/ac47/2.html. Not that it really matters.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Tikz chain labels for nodes with includegraphics

Post by Stefan Kottwitz »

Hi,

welcome to the board!
megaflop wrote:What I want to do is to put the switch (and everything that's beneath it) under the BRAS not under the AAA
I guess you need to make a branch before AAA instead of going below after AAA.
megaflop wrote:And of course the labels are misplaced I don't understand why.
Not when I compile your code. I got:
network.png
network.png (13.65 KiB) Viewed 6862 times
Some images are missing, perhaps an issue with the eps pictures, but that's not the question here. The labels look better than in your output, even if I did not change the code. Perhaps update your TikZ package if it's not a current version.

If there's still a problem, I suggest that you should post a Infominimal working example, i.e. a compilable short version. Your remaining packages and settings are unknown. And it would be better if you would add simple things such as class, \begin{document}, \end{document} etc. if you would like readers to test your code. Otherwise every reader has to fix and to complete the code again - not everybody does it. Also I postponed an answer until I had some time to deal with incomplete code.

Stefan
LaTeX.org admin
Post Reply