« Return to Thread: tikz diagram does not scale

tikz diagram does not scale

by Erik Bernoth :: Rate this Message:

Reply to Author | View in Thread

Hi guys,

I try to create some diagrams with pgf/tikz but can't scale them now. If I try the examples with Karl in the tikz documentation, they work. Can you explain the difference here and there?

(I set up a minimum example, but hopefully all key elements are involved)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,oneside,a4paper]{book}
\pagestyle{headings}
\usepackage[german]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning,shapes.misc,chains,arrows,fit}

\begin{document}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
\tikzset{
  line/.style ={draw, thick,shorten >=0.1pt},
  background colors/.style={fill=black!3, draw=black!80}
}%e.o.tikzset
\begin{figure}
\begin{tikzpicture} [scale=0.25] %scaling here?
  \node (a) {peter};
  \node [right=of a] (b) {parker};
  \begin{scope}
    \path[line] (a) -- (b);
  \end{scope}
  \begin{pgfonlayer}{background}
    \node (c) [fill=black!10, fit=(a) (b)] {};
  \end{pgfonlayer}
\end{tikzpicture}
\caption{some text \label{scaleMe}}
\end{figure}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

regards
Erik B.


------------------------------------------------------------------------------

_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users

 « Return to Thread: tikz diagram does not scale