How to reduce the space vertically and horizontally between sub figures in Latex? [on hold]











up vote
0
down vote

favorite












I have 6 graphs and in I put 2 graphs in a row (Parallel) it means used 3 rows for 6 graphs. Now It having more spaces vertically (can see in image in RED) and horizontal (can see in the image in Blue).



Please help me, how can I reduce the size between subfigures horizontally and vertically?



begin{figure}[ht]
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHKNN.eps}
caption{}
label{fig:a1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHKNN.eps}
caption{}
label{fig:b1}
end{subfigure}
newline
%parmidskip % force a bit of vertical whitespace
%centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPKNN.eps}
caption{}
label{fig:c1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHDT.eps}
caption{}
label{fig:d1}
end{subfigure}\
%parmidskip % force a bit of vertical whitespace
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHDT.eps}
caption{}
label{fig:e1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPDT.eps}
caption{}
label{fig:f1}
end{subfigure}
hfill
caption{The impact of long ABC; ~ref{fig:a1} a by using K; ~ref{fig:b1} H position by using K; ~ref{fig:c1} f by using K; ~ref{fig:d1} z by using D; ~ref{fig:e1} a by using D; ~ref{fig:f1} T position by using D}
label{fig 4:gr2}
end{figure}


enter image description hereenter image description here










share|improve this question















put on hold as unclear what you're asking by egreg, Kurt, dexteritas, Phelype Oleinik, Romain Picot yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    Hi there! Does this code you have provided honestly work for you? Shouldn't centring be centering
    – Au101
    Sep 19 at 13:55










  • your problem are your pictures. apparently they have white space around them. to see this put includegraphics[scale=0.45]{RHDT.eps} (and all other pictures) in frame{...}.. if i'm right, than you need to trim this white space.
    – Zarko
    Sep 19 at 14:00










  • @Au101 I edited with centering, still same problem.
    – Nafees Ahmed
    Sep 19 at 14:10










  • How can I trim the white spaces @Zarko
    – Nafees Ahmed
    Sep 19 at 14:11






  • 1




    i don't know, how images are generated. manysoftweres for generating such images has option to define border around image. you can also use some programs (like snipping tool in windows) which is capable to trim image showed on screen.
    – Zarko
    Sep 19 at 14:16















up vote
0
down vote

favorite












I have 6 graphs and in I put 2 graphs in a row (Parallel) it means used 3 rows for 6 graphs. Now It having more spaces vertically (can see in image in RED) and horizontal (can see in the image in Blue).



Please help me, how can I reduce the size between subfigures horizontally and vertically?



begin{figure}[ht]
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHKNN.eps}
caption{}
label{fig:a1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHKNN.eps}
caption{}
label{fig:b1}
end{subfigure}
newline
%parmidskip % force a bit of vertical whitespace
%centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPKNN.eps}
caption{}
label{fig:c1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHDT.eps}
caption{}
label{fig:d1}
end{subfigure}\
%parmidskip % force a bit of vertical whitespace
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHDT.eps}
caption{}
label{fig:e1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPDT.eps}
caption{}
label{fig:f1}
end{subfigure}
hfill
caption{The impact of long ABC; ~ref{fig:a1} a by using K; ~ref{fig:b1} H position by using K; ~ref{fig:c1} f by using K; ~ref{fig:d1} z by using D; ~ref{fig:e1} a by using D; ~ref{fig:f1} T position by using D}
label{fig 4:gr2}
end{figure}


enter image description hereenter image description here










share|improve this question















put on hold as unclear what you're asking by egreg, Kurt, dexteritas, Phelype Oleinik, Romain Picot yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    Hi there! Does this code you have provided honestly work for you? Shouldn't centring be centering
    – Au101
    Sep 19 at 13:55










  • your problem are your pictures. apparently they have white space around them. to see this put includegraphics[scale=0.45]{RHDT.eps} (and all other pictures) in frame{...}.. if i'm right, than you need to trim this white space.
    – Zarko
    Sep 19 at 14:00










  • @Au101 I edited with centering, still same problem.
    – Nafees Ahmed
    Sep 19 at 14:10










  • How can I trim the white spaces @Zarko
    – Nafees Ahmed
    Sep 19 at 14:11






  • 1




    i don't know, how images are generated. manysoftweres for generating such images has option to define border around image. you can also use some programs (like snipping tool in windows) which is capable to trim image showed on screen.
    – Zarko
    Sep 19 at 14:16













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have 6 graphs and in I put 2 graphs in a row (Parallel) it means used 3 rows for 6 graphs. Now It having more spaces vertically (can see in image in RED) and horizontal (can see in the image in Blue).



Please help me, how can I reduce the size between subfigures horizontally and vertically?



begin{figure}[ht]
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHKNN.eps}
caption{}
label{fig:a1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHKNN.eps}
caption{}
label{fig:b1}
end{subfigure}
newline
%parmidskip % force a bit of vertical whitespace
%centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPKNN.eps}
caption{}
label{fig:c1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHDT.eps}
caption{}
label{fig:d1}
end{subfigure}\
%parmidskip % force a bit of vertical whitespace
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHDT.eps}
caption{}
label{fig:e1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPDT.eps}
caption{}
label{fig:f1}
end{subfigure}
hfill
caption{The impact of long ABC; ~ref{fig:a1} a by using K; ~ref{fig:b1} H position by using K; ~ref{fig:c1} f by using K; ~ref{fig:d1} z by using D; ~ref{fig:e1} a by using D; ~ref{fig:f1} T position by using D}
label{fig 4:gr2}
end{figure}


enter image description hereenter image description here










share|improve this question















I have 6 graphs and in I put 2 graphs in a row (Parallel) it means used 3 rows for 6 graphs. Now It having more spaces vertically (can see in image in RED) and horizontal (can see in the image in Blue).



Please help me, how can I reduce the size between subfigures horizontally and vertically?



begin{figure}[ht]
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHKNN.eps}
caption{}
label{fig:a1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHKNN.eps}
caption{}
label{fig:b1}
end{subfigure}
newline
%parmidskip % force a bit of vertical whitespace
%centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPKNN.eps}
caption{}
label{fig:c1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHDT.eps}
caption{}
label{fig:d1}
end{subfigure}\
%parmidskip % force a bit of vertical whitespace
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHDT.eps}
caption{}
label{fig:e1}
end{subfigure}
hfill
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPDT.eps}
caption{}
label{fig:f1}
end{subfigure}
hfill
caption{The impact of long ABC; ~ref{fig:a1} a by using K; ~ref{fig:b1} H position by using K; ~ref{fig:c1} f by using K; ~ref{fig:d1} z by using D; ~ref{fig:e1} a by using D; ~ref{fig:f1} T position by using D}
label{fig 4:gr2}
end{figure}


enter image description hereenter image description here







graphics






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 19 at 13:53









moewe

82.7k8106317




82.7k8106317










asked Sep 19 at 13:49









Nafees Ahmed

406




406




put on hold as unclear what you're asking by egreg, Kurt, dexteritas, Phelype Oleinik, Romain Picot yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as unclear what you're asking by egreg, Kurt, dexteritas, Phelype Oleinik, Romain Picot yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 2




    Hi there! Does this code you have provided honestly work for you? Shouldn't centring be centering
    – Au101
    Sep 19 at 13:55










  • your problem are your pictures. apparently they have white space around them. to see this put includegraphics[scale=0.45]{RHDT.eps} (and all other pictures) in frame{...}.. if i'm right, than you need to trim this white space.
    – Zarko
    Sep 19 at 14:00










  • @Au101 I edited with centering, still same problem.
    – Nafees Ahmed
    Sep 19 at 14:10










  • How can I trim the white spaces @Zarko
    – Nafees Ahmed
    Sep 19 at 14:11






  • 1




    i don't know, how images are generated. manysoftweres for generating such images has option to define border around image. you can also use some programs (like snipping tool in windows) which is capable to trim image showed on screen.
    – Zarko
    Sep 19 at 14:16














  • 2




    Hi there! Does this code you have provided honestly work for you? Shouldn't centring be centering
    – Au101
    Sep 19 at 13:55










  • your problem are your pictures. apparently they have white space around them. to see this put includegraphics[scale=0.45]{RHDT.eps} (and all other pictures) in frame{...}.. if i'm right, than you need to trim this white space.
    – Zarko
    Sep 19 at 14:00










  • @Au101 I edited with centering, still same problem.
    – Nafees Ahmed
    Sep 19 at 14:10










  • How can I trim the white spaces @Zarko
    – Nafees Ahmed
    Sep 19 at 14:11






  • 1




    i don't know, how images are generated. manysoftweres for generating such images has option to define border around image. you can also use some programs (like snipping tool in windows) which is capable to trim image showed on screen.
    – Zarko
    Sep 19 at 14:16








2




2




Hi there! Does this code you have provided honestly work for you? Shouldn't centring be centering
– Au101
Sep 19 at 13:55




Hi there! Does this code you have provided honestly work for you? Shouldn't centring be centering
– Au101
Sep 19 at 13:55












your problem are your pictures. apparently they have white space around them. to see this put includegraphics[scale=0.45]{RHDT.eps} (and all other pictures) in frame{...}.. if i'm right, than you need to trim this white space.
– Zarko
Sep 19 at 14:00




your problem are your pictures. apparently they have white space around them. to see this put includegraphics[scale=0.45]{RHDT.eps} (and all other pictures) in frame{...}.. if i'm right, than you need to trim this white space.
– Zarko
Sep 19 at 14:00












@Au101 I edited with centering, still same problem.
– Nafees Ahmed
Sep 19 at 14:10




@Au101 I edited with centering, still same problem.
– Nafees Ahmed
Sep 19 at 14:10












How can I trim the white spaces @Zarko
– Nafees Ahmed
Sep 19 at 14:11




How can I trim the white spaces @Zarko
– Nafees Ahmed
Sep 19 at 14:11




1




1




i don't know, how images are generated. manysoftweres for generating such images has option to define border around image. you can also use some programs (like snipping tool in windows) which is capable to trim image showed on screen.
– Zarko
Sep 19 at 14:16




i don't know, how images are generated. manysoftweres for generating such images has option to define border around image. you can also use some programs (like snipping tool in windows) which is capable to trim image showed on screen.
– Zarko
Sep 19 at 14:16










1 Answer
1






active

oldest

votes

















up vote
1
down vote













After struggling 10 to 12 hours I reached some solution, I removed hfill from the code and used begin{figure*}[t!] instead of begin{figure}[ht].



Here is the code:



begin{figure*}[t!]
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHKNN.eps}
caption{}
label{fig:a1}
end{subfigure}
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHKNN.eps}
caption{}
label{fig:b1}
end{subfigure}
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPKNN.eps}
caption{}
label{fig:c1}
end{subfigure}
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{RHDT.eps}
caption{}
label{fig:d1}
end{subfigure}\
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{LHDT.eps}
caption{}
label{fig:e1}
end{subfigure}
centring
begin{subfigure}[b]{0.45textwidth}
centring
includegraphics[scale=0.45]{TPDT.eps}
caption{}
label{fig:f1}
end{subfigure}

caption[A set of six sub figures.]{The impact of ABC:
textbf{(subref{fig:a1})} app by using K;
textbf{(subref{fig:b1})} La by using Ka;
textbf{(subref{fig:c1})} Ta by using K;
textbf{(subref{fig:d1})} Ra by using Da;
textbf{(subref{fig:e1})} Aa by using Db;
textbf{(subref{fig:f1})} To by using Da
}%
label{fig 4:gr2}
end{figure*}





share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    After struggling 10 to 12 hours I reached some solution, I removed hfill from the code and used begin{figure*}[t!] instead of begin{figure}[ht].



    Here is the code:



    begin{figure*}[t!]
    centring
    begin{subfigure}[b]{0.45textwidth}
    centring
    includegraphics[scale=0.45]{RHKNN.eps}
    caption{}
    label{fig:a1}
    end{subfigure}
    centring
    begin{subfigure}[b]{0.45textwidth}
    centring
    includegraphics[scale=0.45]{LHKNN.eps}
    caption{}
    label{fig:b1}
    end{subfigure}
    begin{subfigure}[b]{0.45textwidth}
    centring
    includegraphics[scale=0.45]{TPKNN.eps}
    caption{}
    label{fig:c1}
    end{subfigure}
    centring
    begin{subfigure}[b]{0.45textwidth}
    centring
    includegraphics[scale=0.45]{RHDT.eps}
    caption{}
    label{fig:d1}
    end{subfigure}\
    centring
    begin{subfigure}[b]{0.45textwidth}
    centring
    includegraphics[scale=0.45]{LHDT.eps}
    caption{}
    label{fig:e1}
    end{subfigure}
    centring
    begin{subfigure}[b]{0.45textwidth}
    centring
    includegraphics[scale=0.45]{TPDT.eps}
    caption{}
    label{fig:f1}
    end{subfigure}

    caption[A set of six sub figures.]{The impact of ABC:
    textbf{(subref{fig:a1})} app by using K;
    textbf{(subref{fig:b1})} La by using Ka;
    textbf{(subref{fig:c1})} Ta by using K;
    textbf{(subref{fig:d1})} Ra by using Da;
    textbf{(subref{fig:e1})} Aa by using Db;
    textbf{(subref{fig:f1})} To by using Da
    }%
    label{fig 4:gr2}
    end{figure*}





    share|improve this answer

























      up vote
      1
      down vote













      After struggling 10 to 12 hours I reached some solution, I removed hfill from the code and used begin{figure*}[t!] instead of begin{figure}[ht].



      Here is the code:



      begin{figure*}[t!]
      centring
      begin{subfigure}[b]{0.45textwidth}
      centring
      includegraphics[scale=0.45]{RHKNN.eps}
      caption{}
      label{fig:a1}
      end{subfigure}
      centring
      begin{subfigure}[b]{0.45textwidth}
      centring
      includegraphics[scale=0.45]{LHKNN.eps}
      caption{}
      label{fig:b1}
      end{subfigure}
      begin{subfigure}[b]{0.45textwidth}
      centring
      includegraphics[scale=0.45]{TPKNN.eps}
      caption{}
      label{fig:c1}
      end{subfigure}
      centring
      begin{subfigure}[b]{0.45textwidth}
      centring
      includegraphics[scale=0.45]{RHDT.eps}
      caption{}
      label{fig:d1}
      end{subfigure}\
      centring
      begin{subfigure}[b]{0.45textwidth}
      centring
      includegraphics[scale=0.45]{LHDT.eps}
      caption{}
      label{fig:e1}
      end{subfigure}
      centring
      begin{subfigure}[b]{0.45textwidth}
      centring
      includegraphics[scale=0.45]{TPDT.eps}
      caption{}
      label{fig:f1}
      end{subfigure}

      caption[A set of six sub figures.]{The impact of ABC:
      textbf{(subref{fig:a1})} app by using K;
      textbf{(subref{fig:b1})} La by using Ka;
      textbf{(subref{fig:c1})} Ta by using K;
      textbf{(subref{fig:d1})} Ra by using Da;
      textbf{(subref{fig:e1})} Aa by using Db;
      textbf{(subref{fig:f1})} To by using Da
      }%
      label{fig 4:gr2}
      end{figure*}





      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        After struggling 10 to 12 hours I reached some solution, I removed hfill from the code and used begin{figure*}[t!] instead of begin{figure}[ht].



        Here is the code:



        begin{figure*}[t!]
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{RHKNN.eps}
        caption{}
        label{fig:a1}
        end{subfigure}
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{LHKNN.eps}
        caption{}
        label{fig:b1}
        end{subfigure}
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{TPKNN.eps}
        caption{}
        label{fig:c1}
        end{subfigure}
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{RHDT.eps}
        caption{}
        label{fig:d1}
        end{subfigure}\
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{LHDT.eps}
        caption{}
        label{fig:e1}
        end{subfigure}
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{TPDT.eps}
        caption{}
        label{fig:f1}
        end{subfigure}

        caption[A set of six sub figures.]{The impact of ABC:
        textbf{(subref{fig:a1})} app by using K;
        textbf{(subref{fig:b1})} La by using Ka;
        textbf{(subref{fig:c1})} Ta by using K;
        textbf{(subref{fig:d1})} Ra by using Da;
        textbf{(subref{fig:e1})} Aa by using Db;
        textbf{(subref{fig:f1})} To by using Da
        }%
        label{fig 4:gr2}
        end{figure*}





        share|improve this answer












        After struggling 10 to 12 hours I reached some solution, I removed hfill from the code and used begin{figure*}[t!] instead of begin{figure}[ht].



        Here is the code:



        begin{figure*}[t!]
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{RHKNN.eps}
        caption{}
        label{fig:a1}
        end{subfigure}
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{LHKNN.eps}
        caption{}
        label{fig:b1}
        end{subfigure}
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{TPKNN.eps}
        caption{}
        label{fig:c1}
        end{subfigure}
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{RHDT.eps}
        caption{}
        label{fig:d1}
        end{subfigure}\
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{LHDT.eps}
        caption{}
        label{fig:e1}
        end{subfigure}
        centring
        begin{subfigure}[b]{0.45textwidth}
        centring
        includegraphics[scale=0.45]{TPDT.eps}
        caption{}
        label{fig:f1}
        end{subfigure}

        caption[A set of six sub figures.]{The impact of ABC:
        textbf{(subref{fig:a1})} app by using K;
        textbf{(subref{fig:b1})} La by using Ka;
        textbf{(subref{fig:c1})} Ta by using K;
        textbf{(subref{fig:d1})} Ra by using Da;
        textbf{(subref{fig:e1})} Aa by using Db;
        textbf{(subref{fig:f1})} To by using Da
        }%
        label{fig 4:gr2}
        end{figure*}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 20 at 5:45









        Nafees Ahmed

        406




        406















            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt