如何在橫向模式下產生 tikz 圖?我正在嘗試製作一個獨立的圖表,因為我不會將其包含在文件或文章中。該解決方案似乎不適用於我的情況:在橫向模式下使用 TikZ?。我嘗試使用\usepackage[landscape]{geometry}
and\usepackage{pdflscape}
和\usepackage[pdftex]{lscape}
;但似乎都不起作用。當我編譯時,我收到此錯誤訊息:
!插入缺少 \endgroup。 \endgroup l.10 \begin{風景}
當我刪除它時begin{landscape}
,end{landscape}
我只是有一個常規的縱向方向,這會切斷我的角色。
\documentclass{standalone}
\usepackage{tikz}
%\usepackage[landscape]{geometry}
\usepackage[pdftex]{lscape}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.misc,positioning,calc}
\tikzstyle{g} = [draw,line width=3mm]
\begin{document}
\begin{landscape}
\begin{tikzpicture}
%%%%%%%%%%%%%%PNG nodes%%%%%%%%%%%%%%
\node[inner sep=1pt] (mp) at (0,0) {\includegraphics[scale=.75] {./mortarpestle.png}}; %%%MORTAR%%%
\node[inner sep=1pt,right=2mm of mp] (crude) {\includegraphics[scale=.4]{./crude.png}}; %%%CRUDE%%%
%
\node[inner sep=1pt,anchor=base west] (tecan) at ($(crude.south)+(6,0)$){\includegraphics[scale=0.5]{./tecan_prefrac.png}} node (tecantxt) [below=5mm of tecan,text width=4.25cm,align=center] {\large{\textbf{Fractionation using Tecan robotics}}}; %%%TECAN%%%
%
\coordinate[inner sep=1pt,below=.6cm of tecantxt] (b4nci);
\node[inner sep=1pt,anchor=east] (nci) at ($(b4nci-|tecan.east)+(0,-3.25)$) {\includegraphics[scale=.4] {./onedose.png}};
%
%%%BENT NODE FOR NCI-60
\coordinate[inner sep=1pt] (topnci2) at (nci.north);
\coordinate[inner sep=1pt] (topnci1) at ($(topnci2|-b4nci)$);
%
\node[inner sep=1pt,anchor=base east] (gilson) at ($(nci.south west)+(-3.9,0)$) {\includegraphics[width=6.1cm]{./gilson.png}} node (gilsontxt) [below=5mm of gilson,text width=3cm,align=center] {\large{\textbf{Second stage fractionation}}}; %%%GILSON%%%
%
\node[inner sep=1pt,anchor=base east] (96dw) at ($(gilson.south west)+(-3.9,0)$) {\includegraphics[scale=0.7] {./DWplate_NMRtube.png}} node (platetxt) [below=5mm of 96dw,text width=3.5cm,align=center] {\large{\textbf{Selection of active fractions}}};%%%DWNMRPLATE%%%
\node[inner sep=1pt,below=1.25cm of platetxt] (nmr) {\includegraphics[scale=0.6] {./bruker_AV600.png}} node [below=5mm of nmr,text width=3cm,align=center] {\large{\textbf{NMR analysis}}}; %%%NMR INSTRUMENT%%%
%
\node[inner sep=1pt,right=1cm of nmr] (txtsearch) {\includegraphics[scale=1.5]{./txtsearch.png}};
\node[inner sep=1pt,right=2mm of txtsearch] (marinlit) {\includegraphics[scale=0.65]{./marinlit.png}};
%
\node[inner sep=1pt,right=1.5cm of marinlit.east] (hplc) {\includegraphics[scale=0.15]{./hplc.png}};
\node[inner sep=1pt,right= 1.25cm of hplc.east] (2dnmr) {\includegraphics[scale=0.3]{./2d_NMRplot.png}};
\node[inner sep=1pt,below=2mm of 2dnmr.south] (lcms) {\includegraphics[scale=0.3]{./lcms.png}};
%
%%TEXT NODES%%%%%%%%%%%%%%
\node [text width=3cm,align=center]at ($(mp)!0.5!(crude) + (0,-2)$) {\large{\textbf{Crude Extract}}};
\node [text width=3.2cm,align=center] at ($(nci.south)+(0,-1)$) {\large{\textbf{NCI-60 onedose screen}}};
%
%%ARROWS%%%%%%%%%%%%%%%
\path[g,->] ($(crude.east)+(.15,0)$) -- ($(crude-| tecan.west)$);
\path[g,->] (tecantxt) -- (b4nci.north) -- (topnci1)--(topnci2); %BENT ARROW
%
\path[g,->] ($(nci.west)+(-.15,0)$)-- ($(gilson.east|-nci.west)$);
\path[g,->] ($(gilson.west|-nci.west)$) -- ($(96dw.east|-nci.west) $);
\path[g,->] (platetxt.south) -- (nmr.north);
\end{tikzpicture}
\end{landscape}
\end{document}
答案1
該rotating
包及其sideways
環境工作(請注意,我已將您的圖像替換為example-image-a
):
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.misc,positioning,calc}
\tikzstyle{g} = [draw,line width=3mm]
\usepackage{rotating}
\begin{document}
\begin{sideways}
\begin{tikzpicture}
%%%%%%%%%%%%%%PNG nodes%%%%%%%%%%%%%%
\node[inner sep=1pt] (mp) at (0,0) {\includegraphics[scale=.75] {example-image-a}}; %%%MORTAR%%%
\node[inner sep=1pt,right=2mm of mp] (crude) {\includegraphics[scale=.4]{example-image-a}}; %%%CRUDE%%%
%
\node[inner sep=1pt,anchor=base west] (tecan) at ($(crude.south)+(6,0)$){\includegraphics[scale=0.5]{example-image-a}} node (tecantxt) [below=5mm of tecan,text width=4.25cm,align=center] {\large{\textbf{Fractionation using Tecan robotics}}}; %%%TECAN%%%
%
\coordinate[inner sep=1pt,below=.6cm of tecantxt] (b4nci);
\node[inner sep=1pt,anchor=east] (nci) at ($(b4nci-|tecan.east)+(0,-3.25)$) {\includegraphics[scale=.4] {example-image-a}};
%
%%%BENT NODE FOR NCI-60
\coordinate[inner sep=1pt] (topnci2) at (nci.north);
\coordinate[inner sep=1pt] (topnci1) at ($(topnci2|-b4nci)$);
%
\node[inner sep=1pt,anchor=base east] (gilson) at ($(nci.south west)+(-3.9,0)$) {\includegraphics[width=6.1cm]{example-image-a}} node (gilsontxt) [below=5mm of gilson,text width=3cm,align=center] {\large{\textbf{Second stage fractionation}}}; %%%GILSON%%%
%
\node[inner sep=1pt,anchor=base east] (96dw) at ($(gilson.south west)+(-3.9,0)$) {\includegraphics[scale=0.7] {example-image-a}} node (platetxt) [below=5mm of 96dw,text width=3.5cm,align=center] {\large{\textbf{Selection of active fractions}}};%%%DWNMRPLATE%%%
\node[inner sep=1pt,below=1.25cm of platetxt] (nmr) {\includegraphics[scale=0.6] {example-image-a}} node [below=5mm of nmr,text width=3cm,align=center] {\large{\textbf{NMR analysis}}}; %%%NMR INSTRUMENT%%%
%
\node[inner sep=1pt,right=1cm of nmr] (txtsearch) {\includegraphics[scale=1.5]{example-image-a}};
\node[inner sep=1pt,right=2mm of txtsearch] (marinlit) {\includegraphics[scale=0.65]{example-image-a}};
%
\node[inner sep=1pt,right=1.5cm of marinlit.east] (hplc) {\includegraphics[scale=0.15]{example-image-a}};
\node[inner sep=1pt,right= 1.25cm of hplc.east] (2dnmr) {\includegraphics[scale=0.3]{example-image-a}};
\node[inner sep=1pt,below=2mm of 2dnmr.south] (lcms) {\includegraphics[scale=0.3]{example-image-a}};
%
%%TEXT NODES%%%%%%%%%%%%%%
\node [text width=3cm,align=center]at ($(mp)!0.5!(crude) + (0,-2)$) {\large{\textbf{Crude Extract}}};
\node [text width=3.2cm,align=center] at ($(nci.south)+(0,-1)$) {\large{\textbf{NCI-60 onedose screen}}};
%
%%ARROWS%%%%%%%%%%%%%%%
\path[g,->] ($(crude.east)+(.15,0)$) -- ($(crude-| tecan.west)$);
\path[g,->] (tecantxt) -- (b4nci.north) -- (topnci1)--(topnci2); %BENT ARROW
%
\path[g,->] ($(nci.west)+(-.15,0)$)-- ($(gilson.east|-nci.west)$);
\path[g,->] ($(gilson.west|-nci.west)$) -- ($(96dw.east|-nci.west) $);
\path[g,->] (platetxt.south) -- (nmr.north);
\end{tikzpicture}
\end{sideways}
\end{document}