4 tikzpictures in a 2x2 layout
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
add a comment |
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
Could you provide a MWE, which include the document class, please?
– manooooh
17 hours ago
add a comment |
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
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
tikz-pgf groupplots
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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}
Thanks guys. I am going to add captioning, so I will use the subfig version.
– Anthony Macks
5 hours ago
add a comment |
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}
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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}
Thanks guys. I am going to add captioning, so I will use the subfig version.
– Anthony Macks
5 hours ago
add a comment |
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}
Thanks guys. I am going to add captioning, so I will use the subfig version.
– Anthony Macks
5 hours ago
add a comment |
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}
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}
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
add a comment |
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
add a comment |
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}
add a comment |
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}
add a comment |
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}
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}
answered 16 hours ago
IgnasiIgnasi
94.8k4175318
94.8k4175318
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Could you provide a MWE, which include the document class, please?
– manooooh
17 hours ago