Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a fairly large tikz diagram here:

\documentclass[12pt]{amsart}
\usepackage[all,cmtip]{xy}
\usepackage{rotating, tikz}
\usetikzlibrary{matrix,arrows}

\title{None}%

\begin{document}

\begin{sidewaysfigure}[p]
\vspace*{350pt}
\hspace{50pt}
\begin{tikzpicture} [description/.style={fill=white,inner sep=2pt}]
    \matrix (m) [matrix of math nodes, row sep=31pt,
    column sep=40pt, text height=1.5ex, text depth=0.25ex]
    { \\ \\ \\ \underset{v_0}{\bullet} & \underset{v_1}{\bullet} & \underset{v_2}{\bullet} & \underset{v_3}{\bullet} & \cdots & \underset{v_{\lambda - 3}}{\bullet} & \underset{v_{\lambda - 2}}{\bullet} & \underset{v_{\lambda - 1}}{\bullet} & \underset{v_\lambda}{\bullet} \\ \\ \\ \\ \\ \\ \\ \\ \underset{\hat v_0}{\bullet} & \underset{\hat v_1}{\bullet} & \underset{\hat v_2}{\bullet} & \underset{\hat v_3}{\bullet} & \cdots & \underset{\hat v_{\lambda - 3}}{\bullet} & \underset{\hat v_{\lambda - 2}}{\bullet} & \underset{\hat v_{\lambda - 1}}{\bullet} & \underset{\hat v_\lambda}{\bullet} \\};
    \path[->,font=\scriptsize]
    (m-4-1) edge [bend left=20] node[auto] {$1$} (m-4-2)
    (m-4-2) edge [bend left=20] node[auto] {$\lambda$} (m-4-1)
            edge [bend left=20] node[auto] {$2$} (m-4-3)
    (m-4-3) edge [bend left=20] node[auto] {$\lambda - 1$} (m-4-2)
            edge [bend left=20] node[auto] {$3$} (m-4-4)
    (m-4-4) edge [bend left=20] node[auto] {$\lambda - 2$} (m-4-3)
            edge [bend left=20] node[auto] {$4$} (m-4-5)
    (m-4-5) edge [bend left=20] node[auto] {$\lambda - 3$} (m-4-4)
            edge [bend left=20] node[auto] {$\lambda - 3$} (m-4-6)
    (m-4-6) edge [bend left=20] node[auto] {$4$} (m-4-5)
            edge [bend left=20] node[auto] {$\lambda - 2$} (m-4-7)
    (m-4-7) edge [bend left=20] node[auto] {$3$} (m-4-6)
            edge [bend left=20] node[auto] {$\lambda - 1$} (m-4-8)
    (m-4-8) edge [bend left=20] node[auto] {$2$} (m-4-7)
            edge [bend left=20] node[auto] {$\lambda$} (m-4-9)
    (m-4-9) edge [bend left=20] node[auto] {$1$} (m-4-8);
    \draw[<-] (m-4-1) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda$} (m-4-1);
    \draw[<-] (m-4-2) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda - 2$} (m-4-2);
    \draw[<-] (m-4-3) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda - 4$} (m-4-3);
    \draw[<-] (m-4-4) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda - 6$} (m-4-4);
    \draw[<-] (m-4-6) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $6 - \lambda$} (m-4-6);
    \draw[<-] (m-4-7) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $4 - \lambda$} (m-4-7);
    \draw[<-] (m-4-8) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $2 - \lambda$} (m-4-8);
    \draw[<-] (m-4-9) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $-\lambda$} (m-4-9);
    \path[draw] (-4.1, -2) rectangle (3.7, 0);
    \draw (-3.5, -1) node {$e$:};
    \draw[<-] (-3.2, -1) .. controls +(-20:18pt) and +(200:18pt) .. (-1.7, -1);
    \draw (-.5, -1) node {$f$:};
    \draw[->] (-.2, -1) .. controls +(20:18pt) and +(160:18pt) .. (1.3, -1);
    \draw (2.5, -1) node {$h$:};
    \draw[<-] (3.1, -1.5) .. controls +(70:40pt) and +(110:40pt) ..  (2.9, -1.5);
    \draw (-.5, 5) node {$V(\lambda)$};
    \path[->,font=\scriptsize]
    (m-12-1) edge [bend left=20] node[auto] {$\lambda$} (m-12-2)
    (m-12-2) edge [bend left=20] node[auto] {$1$} (m-12-1)
            edge [bend left=20] node[auto] {$\lambda - 1$} (m-12-3)
    (m-12-3) edge [bend left=20] node[auto] {$2$} (m-12-2)
            edge [bend left=20] node[auto] {$\lambda - 2$} (m-12-4)
    (m-12-4) edge [bend left=20] node[auto] {$3$} (m-12-3)
            edge [bend left=20] node[auto] {$\lambda - 3$} (m-12-5)
    (m-12-5) edge [bend left=20] node[auto] {$4$} (m-12-4)
            edge [bend left=20] node[auto] {$4$} (m-12-6)
    (m-12-6) edge [bend left=20] node[auto] {$\lambda - 3$} (m-12-5)
            edge [bend left=20] node[auto] {$3$} (m-12-7)
    (m-12-7) edge [bend left=20] node[auto] {$\lambda - 2$} (m-12-6)
            edge [bend left=20] node[auto] {$2$} (m-12-8)
    (m-12-8) edge [bend left=20] node[auto] {$\lambda - 1$} (m-12-7)
            edge [bend left=20] node[auto] {$1$} (m-12-9)
    (m-12-9) edge [bend left=20] node[auto] {$\lambda$} (m-12-8);
    \draw[<-] (m-12-1) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda$} (m-12-1);
    \draw[<-] (m-12-2) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda - 2$} (m-12-2);
    \draw[<-] (m-12-3) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda - 4$} (m-12-3);
    \draw[<-] (m-12-4) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $\lambda - 6$} (m-12-4);
    \draw[<-] (m-12-6) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $6 - \lambda$} (m-12-6);
    \draw[<-] (m-12-7) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $4 - \lambda$} (m-12-7);
    \draw[<-] (m-12-8) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $2 - \lambda$} (m-12-8);
    \draw[<-] (m-12-9) .. controls +(70:50pt) and +(110:50pt) .. node[pos=.5, above]{\scriptsize $-\lambda$} (m-12-9);
    \draw (-.5, -4) node {$V(\lambda)^\ast$};
\end{tikzpicture}
\caption{Graphs of $V(\lambda)$ and $V(\lambda)^\ast$} \label{figV}
\end{sidewaysfigure}

\end{document}

I would like to shrink it. When I change

\begin{tikzpicture} [description/.style={fill=white,inner sep=2pt}]

to

\begin{tikzpicture} [description/.style={fill=white,inner sep=2pt}, transform canvas={scale=.7}]

The caption moves to the side of the figure and I can't figure out why or how to stop it from happening. Any suggestions?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The manual states: “Tracking of the picture size is (locally) switched off …”

This means that the bounding box is lost, which needs to be specified manually via the \useasboundingbox path (= \path[use as bounding box]) which also needs to be outside of the scope that has transform canvas applied to.

You might consider the necessarity to transform your whole picture (this also affects font-sizes!).

Notes

  • I replaced your \hspace macro with the \centering macro.
  • The \vpsace* is not needed with other classes like article. I don't know what amsart does here.
  • The backgrounds library and its keys show background grid and show background rectangle are only temporarily used as they show the bounding box visually.

Code

\documentclass[12pt]{amsart}
\usepackage{rotating, tikz}
\usetikzlibrary{matrix,arrows,backgrounds}

\title{None}%

\begin{document}

\begin{sidewaysfigure}
\centering
\vspace*{350pt}
\begin{tikzpicture}[description/.style={fill=white,inner sep=2pt},show background grid,show background rectangle]
    \useasboundingbox (-6.5,-5) rectangle (6.5,4);
    \scope[transform canvas={scale=.7}]
         % Your actual drawing
    \endscope
\end{tikzpicture}
\caption{Graphs of $V(\lambda)$ and $V(\lambda)^\ast$} \label{figV}
\end{sidewaysfigure}
\end{document}

Output

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.