4 tikzpictures in a 2x2 layout












3















 documentclass{article}
usepackage{pgfplots}
usetikzlibrary{fit,shapes,positioning}

begin{document}

begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
end{document}


The above MWE generates a mapping diagram.
I am trying to create a 2x2 groupplot of the above function mapping diagram.



I have used the groupplot environment on previous occasions with great success (when using graphs on a Cartesian plane); via the addplot command.



However, using the TikZ commands for the function mapping diagrams, all I can generate are 4 boxes with tick marks around them.










share|improve this question

























  • Could you provide a MWE, which include the document class, please?

    – manooooh
    17 hours ago
















3















 documentclass{article}
usepackage{pgfplots}
usetikzlibrary{fit,shapes,positioning}

begin{document}

begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
end{document}


The above MWE generates a mapping diagram.
I am trying to create a 2x2 groupplot of the above function mapping diagram.



I have used the groupplot environment on previous occasions with great success (when using graphs on a Cartesian plane); via the addplot command.



However, using the TikZ commands for the function mapping diagrams, all I can generate are 4 boxes with tick marks around them.










share|improve this question

























  • Could you provide a MWE, which include the document class, please?

    – manooooh
    17 hours ago














3












3








3


1






 documentclass{article}
usepackage{pgfplots}
usetikzlibrary{fit,shapes,positioning}

begin{document}

begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
end{document}


The above MWE generates a mapping diagram.
I am trying to create a 2x2 groupplot of the above function mapping diagram.



I have used the groupplot environment on previous occasions with great success (when using graphs on a Cartesian plane); via the addplot command.



However, using the TikZ commands for the function mapping diagrams, all I can generate are 4 boxes with tick marks around them.










share|improve this question
















 documentclass{article}
usepackage{pgfplots}
usetikzlibrary{fit,shapes,positioning}

begin{document}

begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
end{document}


The above MWE generates a mapping diagram.
I am trying to create a 2x2 groupplot of the above function mapping diagram.



I have used the groupplot environment on previous occasions with great success (when using graphs on a Cartesian plane); via the addplot command.



However, using the TikZ commands for the function mapping diagrams, all I can generate are 4 boxes with tick marks around them.







tikz-pgf groupplots






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 17 hours ago







Anthony Macks

















asked 17 hours ago









Anthony MacksAnthony Macks

1378




1378













  • Could you provide a MWE, which include the document class, please?

    – manooooh
    17 hours ago



















  • Could you provide a MWE, which include the document class, please?

    – manooooh
    17 hours ago

















Could you provide a MWE, which include the document class, please?

– manooooh
17 hours ago





Could you provide a MWE, which include the document class, please?

– manooooh
17 hours ago










2 Answers
2






active

oldest

votes


















4














Personally, I like to use the subfig package inside a figure.



documentclass{article}
usepackage{pgfplots}
usetikzlibrary{fit,shapes,positioning}
usepackage{here}
usepackage{subfig}

begin{document}

begin{figure}[H]
centering
subfloat{
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}}
subfloat{
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}}

subfloat{
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}}
subfloat{
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}}


end{figure}


end{document}


enter image description here






share|improve this answer
























  • Thanks guys. I am going to add captioning, so I will use the subfig version.

    – Anthony Macks
    5 hours ago



















6














A tikzpicture is like a char, you can organize them as you want. In this particular case, I've used a tabular to place them 2x2.



documentclass{article}
usepackage{pgfplots}
usetikzlibrary{fit,shapes,positioning}

begin{document}

begin{tabular}{cc}
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
&
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
\
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
&
begin{tikzpicture}[
mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
shorten >= 3pt, shorten <= 3pt,
every fit/.style={ellipse,draw,inner sep=0pt}
]


node[mydot,label={left:1}] (a1) {};
node[mydot,below=of a1,label={left:2}] (a2) {};
node[mydot,below=of a2,label={left:3}] (a3) {};
node[mydot,below=of a3,label={left:4}] (a4) {};

node[mydot,right=4cm of a1,label={right:1}] (b1) {};
node[mydot,below=of b1,label={right:2}] (b2) {};
node[mydot,below=of b2,label={right:3}] (b3) {};
node[mydot,below=of b3,label={right:4}] (b4) {};

node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

path[->] (a1) edge (b2) edge (b1);
path[->] (a2) edge (b4);
path[->] (a3) edge (b3);
path[<-] (a4) edge (b1);

end{tikzpicture}
end{tabular}
end{document}


enter image description here






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479580%2f4-tikzpictures-in-a-2x2-layout%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    Personally, I like to use the subfig package inside a figure.



    documentclass{article}
    usepackage{pgfplots}
    usetikzlibrary{fit,shapes,positioning}
    usepackage{here}
    usepackage{subfig}

    begin{document}

    begin{figure}[H]
    centering
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}

    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}


    end{figure}


    end{document}


    enter image description here






    share|improve this answer
























    • Thanks guys. I am going to add captioning, so I will use the subfig version.

      – Anthony Macks
      5 hours ago
















    4














    Personally, I like to use the subfig package inside a figure.



    documentclass{article}
    usepackage{pgfplots}
    usetikzlibrary{fit,shapes,positioning}
    usepackage{here}
    usepackage{subfig}

    begin{document}

    begin{figure}[H]
    centering
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}

    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}


    end{figure}


    end{document}


    enter image description here






    share|improve this answer
























    • Thanks guys. I am going to add captioning, so I will use the subfig version.

      – Anthony Macks
      5 hours ago














    4












    4








    4







    Personally, I like to use the subfig package inside a figure.



    documentclass{article}
    usepackage{pgfplots}
    usetikzlibrary{fit,shapes,positioning}
    usepackage{here}
    usepackage{subfig}

    begin{document}

    begin{figure}[H]
    centering
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}

    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}


    end{figure}


    end{document}


    enter image description here






    share|improve this answer













    Personally, I like to use the subfig package inside a figure.



    documentclass{article}
    usepackage{pgfplots}
    usetikzlibrary{fit,shapes,positioning}
    usepackage{here}
    usepackage{subfig}

    begin{document}

    begin{figure}[H]
    centering
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}

    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}
    subfloat{
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}}


    end{figure}


    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 13 hours ago









    rpaparpapa

    8,60112039




    8,60112039













    • Thanks guys. I am going to add captioning, so I will use the subfig version.

      – Anthony Macks
      5 hours ago



















    • Thanks guys. I am going to add captioning, so I will use the subfig version.

      – Anthony Macks
      5 hours ago

















    Thanks guys. I am going to add captioning, so I will use the subfig version.

    – Anthony Macks
    5 hours ago





    Thanks guys. I am going to add captioning, so I will use the subfig version.

    – Anthony Macks
    5 hours ago











    6














    A tikzpicture is like a char, you can organize them as you want. In this particular case, I've used a tabular to place them 2x2.



    documentclass{article}
    usepackage{pgfplots}
    usetikzlibrary{fit,shapes,positioning}

    begin{document}

    begin{tabular}{cc}
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}
    &
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}
    \
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}
    &
    begin{tikzpicture}[
    mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
    shorten >= 3pt, shorten <= 3pt,
    every fit/.style={ellipse,draw,inner sep=0pt}
    ]


    node[mydot,label={left:1}] (a1) {};
    node[mydot,below=of a1,label={left:2}] (a2) {};
    node[mydot,below=of a2,label={left:3}] (a3) {};
    node[mydot,below=of a3,label={left:4}] (a4) {};

    node[mydot,right=4cm of a1,label={right:1}] (b1) {};
    node[mydot,below=of b1,label={right:2}] (b2) {};
    node[mydot,below=of b2,label={right:3}] (b3) {};
    node[mydot,below=of b3,label={right:4}] (b4) {};

    node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
    node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

    path[->] (a1) edge (b2) edge (b1);
    path[->] (a2) edge (b4);
    path[->] (a3) edge (b3);
    path[<-] (a4) edge (b1);

    end{tikzpicture}
    end{tabular}
    end{document}


    enter image description here






    share|improve this answer




























      6














      A tikzpicture is like a char, you can organize them as you want. In this particular case, I've used a tabular to place them 2x2.



      documentclass{article}
      usepackage{pgfplots}
      usetikzlibrary{fit,shapes,positioning}

      begin{document}

      begin{tabular}{cc}
      begin{tikzpicture}[
      mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
      shorten >= 3pt, shorten <= 3pt,
      every fit/.style={ellipse,draw,inner sep=0pt}
      ]


      node[mydot,label={left:1}] (a1) {};
      node[mydot,below=of a1,label={left:2}] (a2) {};
      node[mydot,below=of a2,label={left:3}] (a3) {};
      node[mydot,below=of a3,label={left:4}] (a4) {};

      node[mydot,right=4cm of a1,label={right:1}] (b1) {};
      node[mydot,below=of b1,label={right:2}] (b2) {};
      node[mydot,below=of b2,label={right:3}] (b3) {};
      node[mydot,below=of b3,label={right:4}] (b4) {};

      node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
      node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

      path[->] (a1) edge (b2) edge (b1);
      path[->] (a2) edge (b4);
      path[->] (a3) edge (b3);
      path[<-] (a4) edge (b1);

      end{tikzpicture}
      &
      begin{tikzpicture}[
      mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
      shorten >= 3pt, shorten <= 3pt,
      every fit/.style={ellipse,draw,inner sep=0pt}
      ]


      node[mydot,label={left:1}] (a1) {};
      node[mydot,below=of a1,label={left:2}] (a2) {};
      node[mydot,below=of a2,label={left:3}] (a3) {};
      node[mydot,below=of a3,label={left:4}] (a4) {};

      node[mydot,right=4cm of a1,label={right:1}] (b1) {};
      node[mydot,below=of b1,label={right:2}] (b2) {};
      node[mydot,below=of b2,label={right:3}] (b3) {};
      node[mydot,below=of b3,label={right:4}] (b4) {};

      node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
      node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

      path[->] (a1) edge (b2) edge (b1);
      path[->] (a2) edge (b4);
      path[->] (a3) edge (b3);
      path[<-] (a4) edge (b1);

      end{tikzpicture}
      \
      begin{tikzpicture}[
      mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
      shorten >= 3pt, shorten <= 3pt,
      every fit/.style={ellipse,draw,inner sep=0pt}
      ]


      node[mydot,label={left:1}] (a1) {};
      node[mydot,below=of a1,label={left:2}] (a2) {};
      node[mydot,below=of a2,label={left:3}] (a3) {};
      node[mydot,below=of a3,label={left:4}] (a4) {};

      node[mydot,right=4cm of a1,label={right:1}] (b1) {};
      node[mydot,below=of b1,label={right:2}] (b2) {};
      node[mydot,below=of b2,label={right:3}] (b3) {};
      node[mydot,below=of b3,label={right:4}] (b4) {};

      node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
      node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

      path[->] (a1) edge (b2) edge (b1);
      path[->] (a2) edge (b4);
      path[->] (a3) edge (b3);
      path[<-] (a4) edge (b1);

      end{tikzpicture}
      &
      begin{tikzpicture}[
      mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
      shorten >= 3pt, shorten <= 3pt,
      every fit/.style={ellipse,draw,inner sep=0pt}
      ]


      node[mydot,label={left:1}] (a1) {};
      node[mydot,below=of a1,label={left:2}] (a2) {};
      node[mydot,below=of a2,label={left:3}] (a3) {};
      node[mydot,below=of a3,label={left:4}] (a4) {};

      node[mydot,right=4cm of a1,label={right:1}] (b1) {};
      node[mydot,below=of b1,label={right:2}] (b2) {};
      node[mydot,below=of b2,label={right:3}] (b3) {};
      node[mydot,below=of b3,label={right:4}] (b4) {};

      node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
      node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

      path[->] (a1) edge (b2) edge (b1);
      path[->] (a2) edge (b4);
      path[->] (a3) edge (b3);
      path[<-] (a4) edge (b1);

      end{tikzpicture}
      end{tabular}
      end{document}


      enter image description here






      share|improve this answer


























        6












        6








        6







        A tikzpicture is like a char, you can organize them as you want. In this particular case, I've used a tabular to place them 2x2.



        documentclass{article}
        usepackage{pgfplots}
        usetikzlibrary{fit,shapes,positioning}

        begin{document}

        begin{tabular}{cc}
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        &
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        \
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        &
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        end{tabular}
        end{document}


        enter image description here






        share|improve this answer













        A tikzpicture is like a char, you can organize them as you want. In this particular case, I've used a tabular to place them 2x2.



        documentclass{article}
        usepackage{pgfplots}
        usetikzlibrary{fit,shapes,positioning}

        begin{document}

        begin{tabular}{cc}
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        &
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        \
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        &
        begin{tikzpicture}[
        mydot/.style={ circle, fill, inner sep=2pt }, >=latex,
        shorten >= 3pt, shorten <= 3pt,
        every fit/.style={ellipse,draw,inner sep=0pt}
        ]


        node[mydot,label={left:1}] (a1) {};
        node[mydot,below=of a1,label={left:2}] (a2) {};
        node[mydot,below=of a2,label={left:3}] (a3) {};
        node[mydot,below=of a3,label={left:4}] (a4) {};

        node[mydot,right=4cm of a1,label={right:1}] (b1) {};
        node[mydot,below=of b1,label={right:2}] (b2) {};
        node[mydot,below=of b2,label={right:3}] (b3) {};
        node[mydot,below=of b3,label={right:4}] (b4) {};

        node[draw,fit=(a1) (a2) (a3) (a4),minimum width=2cm] {} ;
        node[draw,fit=(b1) (b2) (b3) (b4),minimum width=2cm] {} ;

        path[->] (a1) edge (b2) edge (b1);
        path[->] (a2) edge (b4);
        path[->] (a3) edge (b3);
        path[<-] (a4) edge (b1);

        end{tikzpicture}
        end{tabular}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 16 hours ago









        IgnasiIgnasi

        94.8k4175318




        94.8k4175318






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479580%2f4-tikzpictures-in-a-2x2-layout%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局