How to get the two pictures alignedRotate a node but not its content: the case of the ellipse decorationHow...
What is the lowest-speed bogey a jet fighter can intercept/escort?
How were the LM astronauts supported during the moon landing and ascent? What were the max G's on them during these phases?
How do professional electronic musicians/sound engineers combat listening fatigue?
How can I prevent corporations from growing their own workforce?
How is the uk visa 180 calculated
Iterate over non-const variables in C++
How do we explain the E major chord in this progression?
Area of parallelogram = Area of square. Shear transform
A fictional island on Earth with "longer" springs and autumns
Are there any examples of technologies have been lost over time?
Explanation for a joke about a three-legged dog that walks into a bar
Why are off grid solar setups only 12, 24, 48 VDC?
This message is flooding my syslog, how to find where it comes from?
What exactly makes a General Products hull nearly indestructible?
expansion with *.txt in the shell doesn't work if no .txt file exists
Time travel novel: machine makes clones, clones battle to be the one to get back their life
The seven story archetypes. Are they truly all of them?
A planet illuminated by a black hole?
Does the Intel 8086 CPU have user mode and kernel mode?
How do I run a game when my PCs have different approaches to combat?
What causes long-running disputes over sovereignty?
Print sums of all subsets
What is the difference between 1/3, 1/2, and full casters?
Is it normal practice to screen share with a client?
How to get the two pictures aligned
Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Computing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionAdjusting edge alignment and positioning of fitted nodeDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themUsing fit with nodepartsUsing tikz Calc package to add cordinates
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
tikz-pgf vertical-alignment
add a comment |
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
tikz-pgf vertical-alignment
1
You could usebegin{tikzpicture}[baseline={(0,0)}]
for bothtikzpicture
s, that will place the origin on the baseline. Another option is to place both diagrams in the sametikzpicture
environment, and enclose the second one inbegin{scope}[xshift=5cm] .. end{scope}
– Torbjørn T.
8 hours ago
add a comment |
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
tikz-pgf vertical-alignment
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
tikz-pgf vertical-alignment
tikz-pgf vertical-alignment
edited 8 hours ago
Torbjørn T.
163k13 gold badges267 silver badges453 bronze badges
163k13 gold badges267 silver badges453 bronze badges
asked 9 hours ago
Poline SandraPoline Sandra
1047 bronze badges
1047 bronze badges
1
You could usebegin{tikzpicture}[baseline={(0,0)}]
for bothtikzpicture
s, that will place the origin on the baseline. Another option is to place both diagrams in the sametikzpicture
environment, and enclose the second one inbegin{scope}[xshift=5cm] .. end{scope}
– Torbjørn T.
8 hours ago
add a comment |
1
You could usebegin{tikzpicture}[baseline={(0,0)}]
for bothtikzpicture
s, that will place the origin on the baseline. Another option is to place both diagrams in the sametikzpicture
environment, and enclose the second one inbegin{scope}[xshift=5cm] .. end{scope}
– Torbjørn T.
8 hours ago
1
1
You could use
begin{tikzpicture}[baseline={(0,0)}]
for both tikzpicture
s, that will place the origin on the baseline. Another option is to place both diagrams in the same tikzpicture
environment, and enclose the second one in begin{scope}[xshift=5cm] .. end{scope}
– Torbjørn T.
8 hours ago
You could use
begin{tikzpicture}[baseline={(0,0)}]
for both tikzpicture
s, that will place the origin on the baseline. Another option is to place both diagrams in the same tikzpicture
environment, and enclose the second one in begin{scope}[xshift=5cm] .. end{scope}
– Torbjørn T.
8 hours ago
add a comment |
3 Answers
3
active
oldest
votes
Well, to visualize the difference between both images I added fbox
to your pictures to get them printed in a frame:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
As you can see (red arrows in screenshot) the height of both images is different. Now let us have a look into your code:
First image:
node at (0,-2.25){$D$};
Second image:
node at (0,-2.5){$C$};
If you choose the same value, for example -2.5
for both images the picture are aligned ...
See the changed MWE to value -2.5
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
and without the added fbox
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
with the result:
what change in without fbox
– Poline Sandra
8 hours ago
1
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The commandfbox
was only to visualize the difference of both images, with -2.5 there is no difference ...
– Mensch
8 hours ago
add a comment |
In the following MWE I have changed the y value of the node
in the marked line from 2.5
to 2.25
. With this change, the x axes of the two plots are aligned, as well as the labels of the y axes.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.25){$C$}; %<-----
end{tikzpicture}
end{document}
add a comment |
As Torbjørn T pointed out in his commentary, it is sufficient to place the baseline of each figure at the origin [baseline={(0,0)}]
.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
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%2f501598%2fhow-to-get-the-two-pictures-aligned%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Well, to visualize the difference between both images I added fbox
to your pictures to get them printed in a frame:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
As you can see (red arrows in screenshot) the height of both images is different. Now let us have a look into your code:
First image:
node at (0,-2.25){$D$};
Second image:
node at (0,-2.5){$C$};
If you choose the same value, for example -2.5
for both images the picture are aligned ...
See the changed MWE to value -2.5
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
and without the added fbox
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
with the result:
what change in without fbox
– Poline Sandra
8 hours ago
1
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The commandfbox
was only to visualize the difference of both images, with -2.5 there is no difference ...
– Mensch
8 hours ago
add a comment |
Well, to visualize the difference between both images I added fbox
to your pictures to get them printed in a frame:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
As you can see (red arrows in screenshot) the height of both images is different. Now let us have a look into your code:
First image:
node at (0,-2.25){$D$};
Second image:
node at (0,-2.5){$C$};
If you choose the same value, for example -2.5
for both images the picture are aligned ...
See the changed MWE to value -2.5
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
and without the added fbox
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
with the result:
what change in without fbox
– Poline Sandra
8 hours ago
1
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The commandfbox
was only to visualize the difference of both images, with -2.5 there is no difference ...
– Mensch
8 hours ago
add a comment |
Well, to visualize the difference between both images I added fbox
to your pictures to get them printed in a frame:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
As you can see (red arrows in screenshot) the height of both images is different. Now let us have a look into your code:
First image:
node at (0,-2.25){$D$};
Second image:
node at (0,-2.5){$C$};
If you choose the same value, for example -2.5
for both images the picture are aligned ...
See the changed MWE to value -2.5
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
and without the added fbox
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
with the result:
Well, to visualize the difference between both images I added fbox
to your pictures to get them printed in a frame:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
As you can see (red arrows in screenshot) the height of both images is different. Now let us have a look into your code:
First image:
node at (0,-2.25){$D$};
Second image:
node at (0,-2.5){$C$};
If you choose the same value, for example -2.5
for both images the picture are aligned ...
See the changed MWE to value -2.5
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
fbox{
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
}
fbox{
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
}
end{document}
with the result:
and without the added fbox
:
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.5){$D$};
end{tikzpicture}
begin{tikzpicture} % <=================================================
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
with the result:
edited 8 hours ago
answered 9 hours ago
MenschMensch
46.6k10 gold badges52 silver badges178 bronze badges
46.6k10 gold badges52 silver badges178 bronze badges
what change in without fbox
– Poline Sandra
8 hours ago
1
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The commandfbox
was only to visualize the difference of both images, with -2.5 there is no difference ...
– Mensch
8 hours ago
add a comment |
what change in without fbox
– Poline Sandra
8 hours ago
1
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The commandfbox
was only to visualize the difference of both images, with -2.5 there is no difference ...
– Mensch
8 hours ago
what change in without fbox
– Poline Sandra
8 hours ago
what change in without fbox
– Poline Sandra
8 hours ago
1
1
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The command
fbox
was only to visualize the difference of both images, with -2.5 there is no difference ...– Mensch
8 hours ago
@PolineSandra See the x axis of both images: they are on the same height, so aligned images as wished ... The command
fbox
was only to visualize the difference of both images, with -2.5 there is no difference ...– Mensch
8 hours ago
add a comment |
In the following MWE I have changed the y value of the node
in the marked line from 2.5
to 2.25
. With this change, the x axes of the two plots are aligned, as well as the labels of the y axes.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.25){$C$}; %<-----
end{tikzpicture}
end{document}
add a comment |
In the following MWE I have changed the y value of the node
in the marked line from 2.5
to 2.25
. With this change, the x axes of the two plots are aligned, as well as the labels of the y axes.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.25){$C$}; %<-----
end{tikzpicture}
end{document}
add a comment |
In the following MWE I have changed the y value of the node
in the marked line from 2.5
to 2.25
. With this change, the x axes of the two plots are aligned, as well as the labels of the y axes.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.25){$C$}; %<-----
end{tikzpicture}
end{document}
In the following MWE I have changed the y value of the node
in the marked line from 2.5
to 2.25
. With this change, the x axes of the two plots are aligned, as well as the labels of the y axes.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.25){$C$}; %<-----
end{tikzpicture}
end{document}
answered 9 hours ago
leandriisleandriis
17k1 gold badge11 silver badges36 bronze badges
17k1 gold badge11 silver badges36 bronze badges
add a comment |
add a comment |
As Torbjørn T pointed out in his commentary, it is sufficient to place the baseline of each figure at the origin [baseline={(0,0)}]
.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
add a comment |
As Torbjørn T pointed out in his commentary, it is sufficient to place the baseline of each figure at the origin [baseline={(0,0)}]
.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
add a comment |
As Torbjørn T pointed out in his commentary, it is sufficient to place the baseline of each figure at the origin [baseline={(0,0)}]
.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
As Torbjørn T pointed out in his commentary, it is sufficient to place the baseline of each figure at the origin [baseline={(0,0)}]
.
documentclass{article}
usepackage{amsmath,amssymb,amsthm}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
usepackage{mathrsfs}
usepackage{amsmath,amssymb,amsthm}
usepackage{geometry}
%%%%%%%%%%%%%%%%%%%
usetikzlibrary{arrows}
usepgfplotslibrary{fillbetween}
usetikzlibrary{patterns,shapes.geometric}
begin{document}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (-1,1)--(1,1)--(1,-1)--(-1,-1)--(-1,1);
node at (0,-2.25){$D$};
end{tikzpicture}
begin{tikzpicture}[baseline={(0,0)}]
draw[line width=.8pt,->] (-2,0.) -- node[pos=0.75,above right]{}(2,0);
draw[line width=.8pt,->] (0.,-2) -- node[pos=0.75,above right]{1}(0,2);
draw[pattern=north west lines] (0,0) circle (1 cm);
node at (0,-2.5){$C$};
end{tikzpicture}
end{document}
answered 6 hours ago
AndréCAndréC
11.3k2 gold badges17 silver badges53 bronze badges
11.3k2 gold badges17 silver badges53 bronze badges
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%2f501598%2fhow-to-get-the-two-pictures-aligned%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
1
You could use
begin{tikzpicture}[baseline={(0,0)}]
for bothtikzpicture
s, that will place the origin on the baseline. Another option is to place both diagrams in the sametikzpicture
environment, and enclose the second one inbegin{scope}[xshift=5cm] .. end{scope}
– Torbjørn T.
8 hours ago