-1

I just start with latex. and i want to draw with tikz. Here is the figure walking pattern

  • 4
    Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – ebosi Dec 6 '16 at 11:57
3

Here is the MWE for the picture below. It uses all the tools you need to draw your final figure:

  • defining nodes, with shapes and label;
  • defining edges, with various styles, bending, and labels;
  • defining styles, with inheritance of properties;
  • using Cartesian and polar coordinates, as well as relative positionning;
  • using math mode;
  • using global settings for the whole tikz picture.

To learn TikZ further, have a look at the PGF manual: it has very good step-by-step examples in the introduction.

enter image description here

\documentclass{standalone}
    \usepackage{tikz}
        \usetikzlibrary{shapes}
        \usetikzlibrary{positioning}

\begin{document}
    \begin{tikzpicture}[
        center-ellipe/.style={
                shape=ellipse,
                draw= red,
                fill=pink,
                dashed
            },
        outside-ellipse/.style={
                shape=ellipse,
                draw= black,
                fill= gray,
                align = center,
            },
        desirable/.style={
                blue,
                ->,
                >=stealth,
                bend left = 30,
            },
        undesirable-straight/.style={
                blue,
                dashed,
                ->,
                >=stealth,
            },
        undesirable/.style={
                undesirable-straight,
                bend right,
            },
        arrow-label/.style={
                font=\small,
                text=gray,
            },
        arrow-start-label/.style={
                arrow-label,
                very near start
            },
        arrow-end-label/.style={
            arrow-label,,
            very near end
        },  
        xscale=3,
        yscale=3,
    ]

        \node (center)   at   (0,0) [center-ellipe]   {Fall};
        \node (circle_t) at  (30:1) [outside-ellipse] {T\\Lorem\\$ipsum$}; %NB: using $<content>$ is for entering math mode content, and should NOT be used for using an italicized typeface (therefor, use \emph{<content>} instead).
        \node (circle_f) at (150:1) [outside-ellipse] {F\\Lorem\\$ipsum$};
        \node (circle_h) at (-90:1) [outside-ellipse] {$h$\\Lorem\\$ipsum$};

        \draw [desirable] (circle_t) edge 
            node [arrow-start-label, right] {Lorem}
            node [arrow-end-label  , below right]   {Ipsum}
        (circle_h);
        \draw [desirable] (circle_f) edge 
            node [arrow-start-label, above] {$x^{-}_{f} \in S^{t}_{f}$}
            node [arrow-end-label  , above]   {Ipsum}
        (circle_t);
        \draw [undesirable] (circle_f) to (circle_h);
        \draw [undesirable-straight] (circle_h) to (center);
    \end{tikzpicture}
\end{document}

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.