tabular with xticks enabled at some plots make one plot moved
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
I have 4 plots arranged using tabular:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularrl
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
As you can see, the lower left plot is slightly moved to the left. How can I fix that?
Why I don't use groupplots
? I want different legends for each of the plots, as you can see. AFAIK this is not possible with groupplots
.
Why I don't use matrix
? According to pgfplots documentation 4.19.4 with matrix you need to use legend to name
.
If it's possible with either one of the other two methods, I happily stand corrected.
Thanks!
pgfplots plot groupplots
add a comment |Â
up vote
5
down vote
favorite
I have 4 plots arranged using tabular:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularrl
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
As you can see, the lower left plot is slightly moved to the left. How can I fix that?
Why I don't use groupplots
? I want different legends for each of the plots, as you can see. AFAIK this is not possible with groupplots
.
Why I don't use matrix
? According to pgfplots documentation 4.19.4 with matrix you need to use legend to name
.
If it's possible with either one of the other two methods, I happily stand corrected.
Thanks!
pgfplots plot groupplots
I think the problem is in the y-axis in your bottom-left figure. It contains2
,4
and6
. But for your top-left figure, it contains a0.5
, and there is additional space for the extra0.
part.
â Ruixi Zhang
Sep 3 at 15:35
Welcome to TeX.SE! Would you be open to usegroupplots
for that?
â marmot
Sep 3 at 15:36
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I have 4 plots arranged using tabular:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularrl
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
As you can see, the lower left plot is slightly moved to the left. How can I fix that?
Why I don't use groupplots
? I want different legends for each of the plots, as you can see. AFAIK this is not possible with groupplots
.
Why I don't use matrix
? According to pgfplots documentation 4.19.4 with matrix you need to use legend to name
.
If it's possible with either one of the other two methods, I happily stand corrected.
Thanks!
pgfplots plot groupplots
I have 4 plots arranged using tabular:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularrl
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
As you can see, the lower left plot is slightly moved to the left. How can I fix that?
Why I don't use groupplots
? I want different legends for each of the plots, as you can see. AFAIK this is not possible with groupplots
.
Why I don't use matrix
? According to pgfplots documentation 4.19.4 with matrix you need to use legend to name
.
If it's possible with either one of the other two methods, I happily stand corrected.
Thanks!
pgfplots plot groupplots
asked Sep 3 at 15:30
Horus
1502
1502
I think the problem is in the y-axis in your bottom-left figure. It contains2
,4
and6
. But for your top-left figure, it contains a0.5
, and there is additional space for the extra0.
part.
â Ruixi Zhang
Sep 3 at 15:35
Welcome to TeX.SE! Would you be open to usegroupplots
for that?
â marmot
Sep 3 at 15:36
add a comment |Â
I think the problem is in the y-axis in your bottom-left figure. It contains2
,4
and6
. But for your top-left figure, it contains a0.5
, and there is additional space for the extra0.
part.
â Ruixi Zhang
Sep 3 at 15:35
Welcome to TeX.SE! Would you be open to usegroupplots
for that?
â marmot
Sep 3 at 15:36
I think the problem is in the y-axis in your bottom-left figure. It contains
2
, 4
and 6
. But for your top-left figure, it contains a 0.5
, and there is additional space for the extra 0.
part.â Ruixi Zhang
Sep 3 at 15:35
I think the problem is in the y-axis in your bottom-left figure. It contains
2
, 4
and 6
. But for your top-left figure, it contains a 0.5
, and there is additional space for the extra 0.
part.â Ruixi Zhang
Sep 3 at 15:35
Welcome to TeX.SE! Would you be open to use
groupplots
for that?â marmot
Sep 3 at 15:36
Welcome to TeX.SE! Would you be open to use
groupplots
for that?â marmot
Sep 3 at 15:36
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
The groupplot library is made for this.
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
usepgfplotslibrarygroupplots
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintikzpicture
begingroupplot[group style=group size=2 by 2,height=4cm, width=linewidth*0.5,]
nextgroupplot[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
nextgroupplot[title=Volume Splines]
addplot abs(x);
nextgroupplot[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
nextgroupplot[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endgroupplot
endtikzpicture
enddocument
Lovely! Not sure why I said thatgroupplot
is not suitable. Thanks!
â Horus
Sep 4 at 7:04
add a comment |Â
up vote
4
down vote
Simply use begintabularll
:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularll
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends withgroupplots
. I took that as a âÂÂnoâ for usinggroupplots
.
â Ruixi Zhang
Sep 3 at 20:22
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
Thanks for your reply, I should mark both as a valid answer. I prefergroupplot
though, don't know why I thought that different legends where not possible.
â Horus
Sep 4 at 7:05
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
The groupplot library is made for this.
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
usepgfplotslibrarygroupplots
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintikzpicture
begingroupplot[group style=group size=2 by 2,height=4cm, width=linewidth*0.5,]
nextgroupplot[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
nextgroupplot[title=Volume Splines]
addplot abs(x);
nextgroupplot[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
nextgroupplot[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endgroupplot
endtikzpicture
enddocument
Lovely! Not sure why I said thatgroupplot
is not suitable. Thanks!
â Horus
Sep 4 at 7:04
add a comment |Â
up vote
3
down vote
accepted
The groupplot library is made for this.
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
usepgfplotslibrarygroupplots
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintikzpicture
begingroupplot[group style=group size=2 by 2,height=4cm, width=linewidth*0.5,]
nextgroupplot[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
nextgroupplot[title=Volume Splines]
addplot abs(x);
nextgroupplot[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
nextgroupplot[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endgroupplot
endtikzpicture
enddocument
Lovely! Not sure why I said thatgroupplot
is not suitable. Thanks!
â Horus
Sep 4 at 7:04
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
The groupplot library is made for this.
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
usepgfplotslibrarygroupplots
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintikzpicture
begingroupplot[group style=group size=2 by 2,height=4cm, width=linewidth*0.5,]
nextgroupplot[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
nextgroupplot[title=Volume Splines]
addplot abs(x);
nextgroupplot[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
nextgroupplot[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endgroupplot
endtikzpicture
enddocument
The groupplot library is made for this.
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
usepgfplotslibrarygroupplots
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintikzpicture
begingroupplot[group style=group size=2 by 2,height=4cm, width=linewidth*0.5,]
nextgroupplot[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
nextgroupplot[title=Volume Splines]
addplot abs(x);
nextgroupplot[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
nextgroupplot[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endgroupplot
endtikzpicture
enddocument
answered Sep 3 at 15:45
marmot
56.2k461123
56.2k461123
Lovely! Not sure why I said thatgroupplot
is not suitable. Thanks!
â Horus
Sep 4 at 7:04
add a comment |Â
Lovely! Not sure why I said thatgroupplot
is not suitable. Thanks!
â Horus
Sep 4 at 7:04
Lovely! Not sure why I said that
groupplot
is not suitable. Thanks!â Horus
Sep 4 at 7:04
Lovely! Not sure why I said that
groupplot
is not suitable. Thanks!â Horus
Sep 4 at 7:04
add a comment |Â
up vote
4
down vote
Simply use begintabularll
:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularll
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends withgroupplots
. I took that as a âÂÂnoâ for usinggroupplots
.
â Ruixi Zhang
Sep 3 at 20:22
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
Thanks for your reply, I should mark both as a valid answer. I prefergroupplot
though, don't know why I thought that different legends where not possible.
â Horus
Sep 4 at 7:05
add a comment |Â
up vote
4
down vote
Simply use begintabularll
:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularll
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends withgroupplots
. I took that as a âÂÂnoâ for usinggroupplots
.
â Ruixi Zhang
Sep 3 at 20:22
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
Thanks for your reply, I should mark both as a valid answer. I prefergroupplot
though, don't know why I thought that different legends where not possible.
â Horus
Sep 4 at 7:05
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Simply use begintabularll
:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularll
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
Simply use begintabularll
:
documentclassscrartcl
usepackagepgfplots
pgfplotssetcompat=1.16
begindocument
pgfplotsset
height=4cm, width=linewidth*0.5,
every axis plot post/.append style=mark=none,
xmin=-1, xmax=1, domain=-1:1, samples=100, minor y tick num=1,
xtick=empty
begintabularll
begintikzpicture[baseline,trim axis left]
beginaxis[title=Gaussian,
legend entries=$s=2$, $s=4$,$s=8$]
addplot exp(- (2*x)^2);
addplot exp(- (4*x)^2);
addplot exp(- (8*x)^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Volume Splines]
addplot abs(x);
endaxis
endtikzpicture
\
begintikzpicture[baseline,trim axis left]
beginaxis[title=Multi Quadrics,
legend entries=$s=2$, $s=4$,$s=6$,
xtick=]
addplot sqrt(2^2 + x^2);
addplot sqrt(4^2 + x^2);
addplot sqrt(6^2 + x^2);
endaxis
endtikzpicture
&
begintikzpicture[baseline,trim axis right]
beginaxis[title=Inverse Multi Quadrics,
legend entries=$s=1$, $s=2$,$s=3$,
xtick=]
addplot 1/sqrt(1^2 + x^2);
addplot 1/sqrt(2^2 + x^2);
addplot 1/sqrt(3^2 + x^2);
endaxis
endtikzpicture
endtabular
enddocument
answered Sep 3 at 15:42
Ruixi Zhang
3,236216
3,236216
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends withgroupplots
. I took that as a âÂÂnoâ for usinggroupplots
.
â Ruixi Zhang
Sep 3 at 20:22
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
Thanks for your reply, I should mark both as a valid answer. I prefergroupplot
though, don't know why I thought that different legends where not possible.
â Horus
Sep 4 at 7:05
add a comment |Â
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends withgroupplots
. I took that as a âÂÂnoâ for usinggroupplots
.
â Ruixi Zhang
Sep 3 at 20:22
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
Thanks for your reply, I should mark both as a valid answer. I prefergroupplot
though, don't know why I thought that different legends where not possible.
â Horus
Sep 4 at 7:05
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends with
groupplots
. I took that as a âÂÂnoâ for using groupplots
.â Ruixi Zhang
Sep 3 at 20:22
@marmot Agreed. I donâÂÂt think the OP is aware of still being able to create different legends with
groupplots
. I took that as a âÂÂnoâ for using groupplots
.â Ruixi Zhang
Sep 3 at 20:22
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
I agree with you. Honestly, I did not read the question that far. ;-)
â marmot
Sep 3 at 20:24
Thanks for your reply, I should mark both as a valid answer. I prefer
groupplot
though, don't know why I thought that different legends where not possible.â Horus
Sep 4 at 7:05
Thanks for your reply, I should mark both as a valid answer. I prefer
groupplot
though, don't know why I thought that different legends where not possible.â Horus
Sep 4 at 7:05
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f449136%2ftabular-with-xticks-enabled-at-some-plots-make-one-plot-moved%23new-answer', 'question_page');
);
Post as a guest
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
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
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
I think the problem is in the y-axis in your bottom-left figure. It contains
2
,4
and6
. But for your top-left figure, it contains a0.5
, and there is additional space for the extra0.
part.â Ruixi Zhang
Sep 3 at 15:35
Welcome to TeX.SE! Would you be open to use
groupplots
for that?â marmot
Sep 3 at 15:36