want to plot the schematic diagram of the following diagram using tikz latex, but it is not correct. enter image description here

\begin{tikzpicture}[node distance=4cm,auto,>=latex',every node/.append style={align=center},int/.style={draw, minimum size=1cm}]
\node [int] (P)             {Phytoplankton (P)};
\node [int, below=of P] (Z) {Zooplankton(Z)};
\node [int, right=of P] (M) {Macrophytes(M)};
\node [int, below=of M] (F) {Fish(F)};
\node [int, right=of F] (W) {Water hyacinth(W)};
\coordinate[right=of M] (out);
 \coordinate[right=of Z] (out);
  \coordinate[right=of F] (out);
  \coordinate[right=of W] (out);
\path[<->, auto=false] (P) edge node {Nutrient/sun light\\competition} (M)
   (M) edge node {competition\\Refuge     \\[2em] } (out) edge  [out=180, in=90] node[below] {competition and\\ Refuge} (W);


  • 3
    Hi! Welcome to TeX.SE! It's better to put a compilable code in your question (you might just need to add \documentclass[tikz,margin=5pt]{standalone} \usetikzlibrary{positioning} \begin{document} and \end{document}). By the way, can you explain more what are your difficulties? It seems to me that you had a good start! (p.s. I had to remove the ' in >=latex')
    – Vinzza
    Feb 28 '19 at 12:31

You are already on a good track.

\begin{tikzpicture}[node distance=5cm and 4cm,auto,>=latex,
every node/.append style={align=center},int/.style={draw, minimum size=1cm},
  \node [int] (P)             {Phytoplankton (P)};
  \node [int, below=of P] (Z) {Zooplankton (Z)};
  \node [int, right=of P] (M) {Macrophytes (M)};
  \node [int, below=of M] (F) {Fish (F)};
  \path (M) -- (F) node [pos=0.7,int,auto=false] (W) {Water hyacinth (W)};
  \draw[->] (Z) -- (F) node[midway] {Predation} %<- uses auto
  node[midway,above=1cm,dashed,draw] (R1) {Refuge effect}
  node[midway,below=1cm,dashed,draw] (R2) {Refuge effect};
  \draw[->] (P) -- (Z) node[midway,below=2mm,dashed,draw,sloped] (R3) {Refuge effect};
  \draw[->] (P) -- (F);
  \foreach \X/\Y in {P/90,M/90}
  {\draw[->] (\X.\Y) -- ++ (\Y:2) node[midway,swap,align=left]{Death\\ respiration};}
  \foreach \X/\Y in {Z/180,W/0,F/0}
  {\draw[->] (\X.\Y) -- ++ (\Y:2) node[midway,above,align=center]{Death\\ respiration};}
  \foreach \X/\Y in {P/M,P.south east/W.north west,M.south east/W.north}
  {\draw[<->,broken] (\X) -- (\Y) 
   node[midway,above,align=center,sloped] {Nutrient/sun\\ light competition};}
  \draw[broken,->]  (W) -- (R3);
  \draw[broken,->]  (W) -- (R1);
  \draw[broken,->]  (M) -- ++ (4.5,0) |- (R2);

enter image description here

  • Thanks!! but the arrow from Phytoplankton to Fish and the word Grazing on the line from Phytoplankton to Zooplankton is missing. I wish the broken lines to be some what visible and colored!!
    – YAB
    Mar 1 '19 at 20:54
  • @YeshambelAzene I added the missing line and changed the style of the dashed lines. If you want a different appearance, you only need to change broken/.style accordingly.
    – user121799
    Mar 1 '19 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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