tikzpicture を includegraphics 環境に埋め込む

tikzpicture を includegraphics 環境に埋め込む

\tikzpicture を に含めて\includegraphics、画像をページの半分に設定したいです。

誰か助けてくれませんか? これが私の MWE です:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz} 
    \usetikzlibrary{chains}
    \usetikzlibrary{positioning}
    \usetikzlibrary{backgrounds}
    \usetikzlibrary{trees}

\usetikzlibrary{arrows,automata}
\usepackage{epstopdf}
\definecolor{mycolor}{RGB}{8,108,131}
\usepackage{array}
\usepackage{adjustbox}      
\usetikzlibrary{shapes}
\usepackage{colortbl}
\begin{document}        
    \begin{figure}[h!]
        \centering
        \includegraphics[width=0.5\textwidth]{%to fill 1/2 of the page and to see entierly my tikzpicture
        \begin{tikzpicture}
            [ 
            show background rectangle,
            background rectangle/.style={fill=gray!10}
            ];
            \node[rounded corners=3mm, fill=mycolor!20] (1) [draw,minimum width=2.4cm,minimum height=2.4cm] {Live functionnal OpenStack Cluster};
            \node[rounded corners=3mm, fill=mycolor!20] (2) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 1] {Configure Tempest};
            \node[rounded corners=3mm, fill=mycolor!20] (3) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 2] {Run Tempest Tests};            
            \node[rounded corners=3mm, fill=mycolor!20] (4) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 3] {Collect test results};
            \node[rounded corners=3mm, fill=mycolor!20] (5) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 4] {Analyse test results};
            \node[rounded corners=3mm, fill=mycolor!20] (6) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 5] {Run Tempest cleanup};
            \draw[thick,->] (1) -- node[above]{} (2);
            \draw[thick,->] (2) -- node[above]{} (3);
            \draw[thick,->] (3) -- node[above]{} (4);
            \draw[thick,->] (4) -- node[above]{} (5);
            \draw[thick,->] (5) -- node[above]{} (6);
          %  \path[mycolor,->,thick] (root) edge  [loop left] node {Auto-signé} ();
        \end{tikzpicture}
        }
        \caption{Chaînage des signatures pour Let's encrypt}
    \end{figure}

\end{document} 

助けてくれてありがとう

答え1

あなたが欲しいのはresizebox

\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz} 
    \usetikzlibrary{chains}
    \usetikzlibrary{positioning}
    \usetikzlibrary{backgrounds}
    \usetikzlibrary{trees}

\usetikzlibrary{arrows,automata}
\usepackage{epstopdf}
\definecolor{mycolor}{RGB}{8,108,131}
\usepackage{array}
\usepackage{adjustbox}      
\usetikzlibrary{shapes}
\usepackage{colortbl}
\begin{document}        
    \begin{figure}[h!]
        \centering
        \resizebox{0.5\textwidth}{!}{%to fill 1/2 of the page and to see entierly my tikzpicture
        \begin{tikzpicture}
            [ 
            show background rectangle,
            background rectangle/.style={fill=gray!10}
            ];
            \node[rounded corners=3mm, fill=mycolor!20] (1) [draw,minimum width=2.4cm,minimum height=2.4cm] {Live functionnal OpenStack Cluster};
            \node[rounded corners=3mm, fill=mycolor!20] (2) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 1] {Configure Tempest};
            \node[rounded corners=3mm, fill=mycolor!20] (3) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 2] {Run Tempest Tests};            
            \node[rounded corners=3mm, fill=mycolor!20] (4) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 3] {Collect test results};
            \node[rounded corners=3mm, fill=mycolor!20] (5) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 4] {Analyse test results};
            \node[rounded corners=3mm, fill=mycolor!20] (6) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 5] {Run Tempest cleanup};
            \draw[thick,->] (1) -- node[above]{} (2);
            \draw[thick,->] (2) -- node[above]{} (3);
            \draw[thick,->] (3) -- node[above]{} (4);
            \draw[thick,->] (4) -- node[above]{} (5);
            \draw[thick,->] (5) -- node[above]{} (6);
          %  \path[mycolor,->,thick] (root) edge  [loop left] node {Auto-signé} ();
        \end{tikzpicture}
        }
        \caption{Chaînage des signatures pour Let's encrypt}
    \end{figure}

    \begin{figure}[h!]
        \centering
        \resizebox{\textwidth}{!}{%to fill 1/2 of the page and to see entierly my tikzpicture
        \begin{tikzpicture}
            [ 
            show background rectangle,
            background rectangle/.style={fill=gray!10}
            ];
            \node[rounded corners=3mm, fill=mycolor!20] (1) [draw,minimum width=2.4cm,minimum height=2.4cm] {Live functionnal OpenStack Cluster};
            \node[rounded corners=3mm, fill=mycolor!20] (2) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 1] {Configure Tempest};
            \node[rounded corners=3mm, fill=mycolor!20] (3) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 2] {Run Tempest Tests};            
            \node[rounded corners=3mm, fill=mycolor!20] (4) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 3] {Collect test results};
            \node[rounded corners=3mm, fill=mycolor!20] (5) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 4] {Analyse test results};
            \node[rounded corners=3mm, fill=mycolor!20] (6) [draw,minimum width=2.4cm,minimum height=2.4cm, right=1cm of 5] {Run Tempest cleanup};
            \draw[thick,->] (1) -- node[above]{} (2);
            \draw[thick,->] (2) -- node[above]{} (3);
            \draw[thick,->] (3) -- node[above]{} (4);
            \draw[thick,->] (4) -- node[above]{} (5);
            \draw[thick,->] (5) -- node[above]{} (6);
          %  \path[mycolor,->,thick] (root) edge  [loop left] node {Auto-signé} ();
        \end{tikzpicture}
        }
        \caption{Chaînage des signatures pour Let's encrypt}
    \end{figure}
\end{document} 

ここに画像の説明を入力してください

関連情報