Adding axes labels to LaTeX figures
I have almost managed,
With this code:
begin{figure}[htb]
hspace*{-5cm}
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
begin{minipage}{dimexprlinewidth-2.50cmrelax}%
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.225]{MagneticTransport.pdf}}
qquad
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.25]{aspectratio.pdf}}
vspace*{0.1cm}hspace*{2.0cm}textcolor{red}{$x$-axis label}
vspace*{0.1cm}hspace*{5.0cm}textcolor{red}{$x$-axis label}
end{minipage}%
end{figure}
I get this:
I would like:
- To have the other 'y-label' next to the second graph, and
- if possible, have the 'x-label' and 'y-label' centred underneath (on the side) of the plots.
subfloats minipage plot
add a comment |
I have almost managed,
With this code:
begin{figure}[htb]
hspace*{-5cm}
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
begin{minipage}{dimexprlinewidth-2.50cmrelax}%
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.225]{MagneticTransport.pdf}}
qquad
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.25]{aspectratio.pdf}}
vspace*{0.1cm}hspace*{2.0cm}textcolor{red}{$x$-axis label}
vspace*{0.1cm}hspace*{5.0cm}textcolor{red}{$x$-axis label}
end{minipage}%
end{figure}
I get this:
I would like:
- To have the other 'y-label' next to the second graph, and
- if possible, have the 'x-label' and 'y-label' centred underneath (on the side) of the plots.
subfloats minipage plot
add a comment |
I have almost managed,
With this code:
begin{figure}[htb]
hspace*{-5cm}
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
begin{minipage}{dimexprlinewidth-2.50cmrelax}%
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.225]{MagneticTransport.pdf}}
qquad
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.25]{aspectratio.pdf}}
vspace*{0.1cm}hspace*{2.0cm}textcolor{red}{$x$-axis label}
vspace*{0.1cm}hspace*{5.0cm}textcolor{red}{$x$-axis label}
end{minipage}%
end{figure}
I get this:
I would like:
- To have the other 'y-label' next to the second graph, and
- if possible, have the 'x-label' and 'y-label' centred underneath (on the side) of the plots.
subfloats minipage plot
I have almost managed,
With this code:
begin{figure}[htb]
hspace*{-5cm}
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
begin{minipage}{dimexprlinewidth-2.50cmrelax}%
begin{minipage}{0.5cm}
rotatebox{90}{textcolor{red}{$y$-axis label}}
end{minipage}%
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.225]{MagneticTransport.pdf}}
qquad
raisebox{dimexpr-.5height-1em}{includegraphics[scale=0.25]{aspectratio.pdf}}
vspace*{0.1cm}hspace*{2.0cm}textcolor{red}{$x$-axis label}
vspace*{0.1cm}hspace*{5.0cm}textcolor{red}{$x$-axis label}
end{minipage}%
end{figure}
I get this:
I would like:
- To have the other 'y-label' next to the second graph, and
- if possible, have the 'x-label' and 'y-label' centred underneath (on the side) of the plots.
subfloats minipage plot
subfloats minipage plot
asked Jun 24 '16 at 14:41
SuperCiociaSuperCiocia
30039
30039
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
A solution with tikzpicture:
documentclass{article}
usepackage{tikz}
usepackage{graphicx}
usetikzlibrary{positioning}
begin{document}
begin{figure}[htb]
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
end{figure}
end{document}
And without minipages:
begin{document}
begin{figure}[htb]
begin{tikzpicture}
node (img1) {includegraphics[scale=0.225]{example-image}};
node[below=of img1, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img1, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
node[right=of img1,yshift=0.1cm] (img2) {includegraphics[scale=0.25]{example-image}};
node[below=of img2, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img2, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{figure}
end{document}
I had to replace your pdf files with the example-image of graphicx. Please try to provide a MWE in future questions.
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
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%2f316481%2fadding-axes-labels-to-latex-figures%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
A solution with tikzpicture:
documentclass{article}
usepackage{tikz}
usepackage{graphicx}
usetikzlibrary{positioning}
begin{document}
begin{figure}[htb]
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
end{figure}
end{document}
And without minipages:
begin{document}
begin{figure}[htb]
begin{tikzpicture}
node (img1) {includegraphics[scale=0.225]{example-image}};
node[below=of img1, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img1, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
node[right=of img1,yshift=0.1cm] (img2) {includegraphics[scale=0.25]{example-image}};
node[below=of img2, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img2, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{figure}
end{document}
I had to replace your pdf files with the example-image of graphicx. Please try to provide a MWE in future questions.
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
add a comment |
A solution with tikzpicture:
documentclass{article}
usepackage{tikz}
usepackage{graphicx}
usetikzlibrary{positioning}
begin{document}
begin{figure}[htb]
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
end{figure}
end{document}
And without minipages:
begin{document}
begin{figure}[htb]
begin{tikzpicture}
node (img1) {includegraphics[scale=0.225]{example-image}};
node[below=of img1, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img1, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
node[right=of img1,yshift=0.1cm] (img2) {includegraphics[scale=0.25]{example-image}};
node[below=of img2, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img2, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{figure}
end{document}
I had to replace your pdf files with the example-image of graphicx. Please try to provide a MWE in future questions.
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
add a comment |
A solution with tikzpicture:
documentclass{article}
usepackage{tikz}
usepackage{graphicx}
usetikzlibrary{positioning}
begin{document}
begin{figure}[htb]
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
end{figure}
end{document}
And without minipages:
begin{document}
begin{figure}[htb]
begin{tikzpicture}
node (img1) {includegraphics[scale=0.225]{example-image}};
node[below=of img1, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img1, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
node[right=of img1,yshift=0.1cm] (img2) {includegraphics[scale=0.25]{example-image}};
node[below=of img2, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img2, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{figure}
end{document}
I had to replace your pdf files with the example-image of graphicx. Please try to provide a MWE in future questions.
A solution with tikzpicture:
documentclass{article}
usepackage{tikz}
usepackage{graphicx}
usetikzlibrary{positioning}
begin{document}
begin{figure}[htb]
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
begin{minipage}{0.4textwidth}
begin{tikzpicture}
node (img) {includegraphics[scale=0.225]{example-image}};
node[below=of img, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{minipage}%
end{figure}
end{document}
And without minipages:
begin{document}
begin{figure}[htb]
begin{tikzpicture}
node (img1) {includegraphics[scale=0.225]{example-image}};
node[below=of img1, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img1, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
node[right=of img1,yshift=0.1cm] (img2) {includegraphics[scale=0.25]{example-image}};
node[below=of img2, node distance=0cm, yshift=1cm,font=color{red}] {x-axis};
node[left=of img2, node distance=0cm, rotate=90, anchor=center,yshift=-0.7cm,font=color{red}] {y-axis};
end{tikzpicture}
end{figure}
end{document}
I had to replace your pdf files with the example-image of graphicx. Please try to provide a MWE in future questions.
edited Jun 24 '16 at 22:01
answered Jun 24 '16 at 15:26
Stefan BraunStefan Braun
989517
989517
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
add a comment |
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
I think it should be "left of=img1" rather than "left=of img1", etc. Also, the anchor seems superfluous
– Joel Wallman
Sep 26 '17 at 21:40
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
@JoelWallman [S G speaking] A minor indication with respect to Joel Wallman comment, the syntax "left = of Img1" is correct and required for right placements.
– JouleV
Mar 16 at 12:14
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%2f316481%2fadding-axes-labels-to-latex-figures%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
