Adding axes labels to LaTeX figures












6















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:enter image description here



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.










share|improve this question



























    6















    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:enter image description here



    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.










    share|improve this question

























      6












      6








      6


      2






      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:enter image description here



      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.










      share|improve this question














      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:enter image description here



      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 24 '16 at 14:41









      SuperCiociaSuperCiocia

      30039




      30039






















          1 Answer
          1






          active

          oldest

          votes


















          6














          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}




          enter image description here



          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.






          share|improve this answer


























          • 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











          Your Answer








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

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

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


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%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









          6














          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}




          enter image description here



          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.






          share|improve this answer


























          • 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
















          6














          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}




          enter image description here



          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.






          share|improve this answer


























          • 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














          6












          6








          6







          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}




          enter image description here



          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.






          share|improve this answer















          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}




          enter image description here



          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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



















          • 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


















          draft saved

          draft discarded




















































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


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

          But avoid



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

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


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




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f316481%2fadding-axes-labels-to-latex-figures%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?