LaTeX forum ⇒ Graphics, Figures & TablesTikz chain labels for nodes with includegraphics

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

Tikz chain labels for nodes with includegraphics

Postby megaflop » Fri Dec 28, 2012 11:31 am

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

When I use the following code:
  1. \usepackage{tikz}
  2. \usetikzlibrary{chains}
  3. \usetikzlibrary{positioning}
  4. \usepackage{epstopdf}
  5. \begin{tikzpicture}
  6. [start chain=going right,diagram item/.style={on chain,join}]
  7. \node[diagram item,label=Internet](Internet){\includegraphics[width=6pc]{figs/Cisco/3015_eps/cloud}};
  8. \node[diagram item,label=Backbone](Backbone){\includegraphics[width=6pc]{figs/Cisco/3015_eps/netranger}};
  9. \node[diagram item,label=BRAS](BRAS){\includegraphics[width=6pc]{figs/Cisco/3015_eps/router}};
  10. \node[continue chain=going right,diagram item,label=AAA](AAA){\includegraphics[width=5pc]{figs/Cisco/3015_eps/pad}};
  11. \node[continue chain=going below,diagram item,label=left:Switch](Switch){\includegraphics[width=6pc]{figs/Cisco/3015_eps/workgroup_switch}};
  12. \node[diagram item,label=left:DSLAM](DSLAM){\includegraphics[width=4.5pc]{figs/Cisco/3015_eps/dslam}};
  13. \node[diagram item,label=left:Filtre](Filtre){\includegraphics[width=1.5pc]{figs/Cisco/3015_eps/pad}};
  14. \node[start branch=1 going right,diagram item,label=right:phone](Phone){\includegraphics[width=6pc]{figs/Cisco/3015_eps/phone}};
  15. \node [diagram item,label=below:PC](PC){\includegraphics[width=6pc]{figs/Cisco/3015_eps/pc}};
  16. \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 2975 times

Link:
BBcode:
HTML:
Hide post links
Show post links

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

Postby megaflop » Fri Dec 28, 2012 1:13 pm

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.

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7803
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sat Dec 29, 2012 4:02 pm

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 2953 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
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests