Minipage/subfigure issue - creating a set of 4x3 graphs (12 total)
up vote
2
down vote
favorite
I am trying to fix a 4 by 3 set of graphs, with caption, on a .tex file. The result I want to achieve is the following:
(this was done in Word. Yes, that's lame, I know.)
The code for each small graph is the following:
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
I've tried a bunch of subfigure/minipage options but the result I am getting is far from ideal (below)
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
EDIT
I've fixed the positioning, but not (yet) the caption. Can someone give me a hint?
newpage
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
Result:
graphics minipage plot
|
show 3 more comments
up vote
2
down vote
favorite
I am trying to fix a 4 by 3 set of graphs, with caption, on a .tex file. The result I want to achieve is the following:
(this was done in Word. Yes, that's lame, I know.)
The code for each small graph is the following:
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
I've tried a bunch of subfigure/minipage options but the result I am getting is far from ideal (below)
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
EDIT
I've fixed the positioning, but not (yet) the caption. Can someone give me a hint?
newpage
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
Result:
graphics minipage plot
Useminipage
like you did but add ahfill
between them. To start a new row just add a linebreak. You can add a caption withcaptionof{figure}{your caption}
from thecaption
package or from KOMA-Script if you're using it
– faltfe
Aug 8 at 13:05
you don't need subfigure or minipages or anything, just put the tikzpicture one after the other and latex will arrange them into lines, just as it does any other paragraph
– David Carlisle
Aug 8 at 13:07
@faltfe you mean like this? begin{minipage}[b]{0.32linewidth} centering begin{tikzpicture} draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9); draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$}; draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};... end{tikzpicture} end{minipage}hfill begin{minipage}[b]{0.32linewidth} centering ... (didn't work)
– bru1987
Aug 8 at 13:10
1
The problem is thattikzpicture
works with actual paper dimensions (default iscm
), so you explicitly told it to make a picture larger thantextwidth/3
. You probably wantresizebox
...
– Phelype Oleinik
Aug 8 at 13:13
2
please do not edit solutions in to the question it makes it very hard to answer. Also you have not provided an example document that makes it easy for people to see the problem or test answers.
– David Carlisle
Aug 8 at 13:30
|
show 3 more comments
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am trying to fix a 4 by 3 set of graphs, with caption, on a .tex file. The result I want to achieve is the following:
(this was done in Word. Yes, that's lame, I know.)
The code for each small graph is the following:
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
I've tried a bunch of subfigure/minipage options but the result I am getting is far from ideal (below)
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
EDIT
I've fixed the positioning, but not (yet) the caption. Can someone give me a hint?
newpage
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
Result:
graphics minipage plot
I am trying to fix a 4 by 3 set of graphs, with caption, on a .tex file. The result I want to achieve is the following:
(this was done in Word. Yes, that's lame, I know.)
The code for each small graph is the following:
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
I've tried a bunch of subfigure/minipage options but the result I am getting is far from ideal (below)
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}
begin{minipage}[b]{0.3linewidth}
centering
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{minipage}%%
EDIT
I've fixed the positioning, but not (yet) the caption. Can someone give me a hint?
newpage
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
begin{figure}[H]
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture} hfill
begin{tikzpicture}[scale=0.36]
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
end{figure}
Result:
graphics minipage plot
graphics minipage plot
edited Aug 8 at 13:26
asked Aug 8 at 12:55
bru1987
1931314
1931314
Useminipage
like you did but add ahfill
between them. To start a new row just add a linebreak. You can add a caption withcaptionof{figure}{your caption}
from thecaption
package or from KOMA-Script if you're using it
– faltfe
Aug 8 at 13:05
you don't need subfigure or minipages or anything, just put the tikzpicture one after the other and latex will arrange them into lines, just as it does any other paragraph
– David Carlisle
Aug 8 at 13:07
@faltfe you mean like this? begin{minipage}[b]{0.32linewidth} centering begin{tikzpicture} draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9); draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$}; draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};... end{tikzpicture} end{minipage}hfill begin{minipage}[b]{0.32linewidth} centering ... (didn't work)
– bru1987
Aug 8 at 13:10
1
The problem is thattikzpicture
works with actual paper dimensions (default iscm
), so you explicitly told it to make a picture larger thantextwidth/3
. You probably wantresizebox
...
– Phelype Oleinik
Aug 8 at 13:13
2
please do not edit solutions in to the question it makes it very hard to answer. Also you have not provided an example document that makes it easy for people to see the problem or test answers.
– David Carlisle
Aug 8 at 13:30
|
show 3 more comments
Useminipage
like you did but add ahfill
between them. To start a new row just add a linebreak. You can add a caption withcaptionof{figure}{your caption}
from thecaption
package or from KOMA-Script if you're using it
– faltfe
Aug 8 at 13:05
you don't need subfigure or minipages or anything, just put the tikzpicture one after the other and latex will arrange them into lines, just as it does any other paragraph
– David Carlisle
Aug 8 at 13:07
@faltfe you mean like this? begin{minipage}[b]{0.32linewidth} centering begin{tikzpicture} draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9); draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$}; draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};... end{tikzpicture} end{minipage}hfill begin{minipage}[b]{0.32linewidth} centering ... (didn't work)
– bru1987
Aug 8 at 13:10
1
The problem is thattikzpicture
works with actual paper dimensions (default iscm
), so you explicitly told it to make a picture larger thantextwidth/3
. You probably wantresizebox
...
– Phelype Oleinik
Aug 8 at 13:13
2
please do not edit solutions in to the question it makes it very hard to answer. Also you have not provided an example document that makes it easy for people to see the problem or test answers.
– David Carlisle
Aug 8 at 13:30
Use
minipage
like you did but add a hfill
between them. To start a new row just add a linebreak. You can add a caption with captionof{figure}{your caption}
from the caption
package or from KOMA-Script if you're using it– faltfe
Aug 8 at 13:05
Use
minipage
like you did but add a hfill
between them. To start a new row just add a linebreak. You can add a caption with captionof{figure}{your caption}
from the caption
package or from KOMA-Script if you're using it– faltfe
Aug 8 at 13:05
you don't need subfigure or minipages or anything, just put the tikzpicture one after the other and latex will arrange them into lines, just as it does any other paragraph
– David Carlisle
Aug 8 at 13:07
you don't need subfigure or minipages or anything, just put the tikzpicture one after the other and latex will arrange them into lines, just as it does any other paragraph
– David Carlisle
Aug 8 at 13:07
@faltfe you mean like this? begin{minipage}[b]{0.32linewidth} centering begin{tikzpicture} draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9); draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$}; draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};... end{tikzpicture} end{minipage}hfill begin{minipage}[b]{0.32linewidth} centering ... (didn't work)
– bru1987
Aug 8 at 13:10
@faltfe you mean like this? begin{minipage}[b]{0.32linewidth} centering begin{tikzpicture} draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9); draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$}; draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};... end{tikzpicture} end{minipage}hfill begin{minipage}[b]{0.32linewidth} centering ... (didn't work)
– bru1987
Aug 8 at 13:10
1
1
The problem is that
tikzpicture
works with actual paper dimensions (default is cm
), so you explicitly told it to make a picture larger than textwidth/3
. You probably want resizebox
...– Phelype Oleinik
Aug 8 at 13:13
The problem is that
tikzpicture
works with actual paper dimensions (default is cm
), so you explicitly told it to make a picture larger than textwidth/3
. You probably want resizebox
...– Phelype Oleinik
Aug 8 at 13:13
2
2
please do not edit solutions in to the question it makes it very hard to answer. Also you have not provided an example document that makes it easy for people to see the problem or test answers.
– David Carlisle
Aug 8 at 13:30
please do not edit solutions in to the question it makes it very hard to answer. Also you have not provided an example document that makes it easy for people to see the problem or test answers.
– David Carlisle
Aug 8 at 13:30
|
show 3 more comments
3 Answers
3
active
oldest
votes
up vote
0
down vote
does it work? Just replace the example image with your tikz code
documentclass{article}
usepackage{graphicx}
usepackage{subcaption}
usepackage{mwe}
begin{document}
begin{figure*}
centering
%%%%%%%%%start of 1st row%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im1}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im2}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im3}
end{subfigure}
%%%%%%%%%%%%%End of 1st row %%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 2nd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im4}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im5}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im6}
end{subfigure}
%%%%%%%%%%%%% End of 2nd row %%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 3rd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im7}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im8}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im9}
end{subfigure}
%%%%%%%%%%%%%End of 3rd row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 4th row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im10}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im11}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im12}
end{subfigure}
%%%%%%%%%%%%%End of 4th row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{figure*}
end{document}
add a comment |
up vote
0
down vote
Using the hint from @PhelypeOleinik that one need resizebox
the following will do the basic grid layout.
documentclass{article}
usepackage{graphicx, tikz, caption}
begin{document}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
dots
end{document}
Each minipage
is using 30 % of the available linewidth
. The gap between the minipage
s get automatically filled by hfill
.
add a comment |
up vote
0
down vote
little late ... but it may help someone :-)
i would draw your diagrams with the pgfplots
package. using it is simple to define size of diagrams in dependency from textwidth
and preserve drawn functions' domains independent from diagram size. it also enable adding diagrams titles with option title
:
documentclass{article}
usepackage[margin=30mm]{geometry} % define page layout
usepackage{pgfplots}
pgfplotsset{compat=1.16}
%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
begin{document}
begin{figure}[htbp]
pgfplotsset{width=0.3linewidth, % digrams' size
scale only axis,
axis lines = middle,
grid,
grid style = {very thin, densely dashed},
xmin=-4.8, xmax=4.8, xtick={-4,-3,...,4}, xticklabels={},
ymin=-4.8, ymax=4.8, ytick={-4,-3,...,4}, yticklabels={},
xlabel=$x$, ylabel=$y$,
xlabel style = {anchor=west, font=footnotesize},
ylabel style = {anchor=south, font=footnotesize},
title style = {yshift=1mm},
%
every axis plot post/.append style={very thick, color=blue!50, smooth},
}
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
caption{Twelve diagrams}
label{fig:twelve}
end{figure}
end{document}
(red lines indicate page layout)
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',
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%2f445140%2fminipage-subfigure-issue-creating-a-set-of-4x3-graphs-12-total%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
up vote
0
down vote
does it work? Just replace the example image with your tikz code
documentclass{article}
usepackage{graphicx}
usepackage{subcaption}
usepackage{mwe}
begin{document}
begin{figure*}
centering
%%%%%%%%%start of 1st row%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im1}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im2}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im3}
end{subfigure}
%%%%%%%%%%%%%End of 1st row %%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 2nd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im4}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im5}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im6}
end{subfigure}
%%%%%%%%%%%%% End of 2nd row %%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 3rd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im7}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im8}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im9}
end{subfigure}
%%%%%%%%%%%%%End of 3rd row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 4th row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im10}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im11}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im12}
end{subfigure}
%%%%%%%%%%%%%End of 4th row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{figure*}
end{document}
add a comment |
up vote
0
down vote
does it work? Just replace the example image with your tikz code
documentclass{article}
usepackage{graphicx}
usepackage{subcaption}
usepackage{mwe}
begin{document}
begin{figure*}
centering
%%%%%%%%%start of 1st row%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im1}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im2}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im3}
end{subfigure}
%%%%%%%%%%%%%End of 1st row %%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 2nd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im4}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im5}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im6}
end{subfigure}
%%%%%%%%%%%%% End of 2nd row %%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 3rd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im7}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im8}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im9}
end{subfigure}
%%%%%%%%%%%%%End of 3rd row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 4th row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im10}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im11}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im12}
end{subfigure}
%%%%%%%%%%%%%End of 4th row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{figure*}
end{document}
add a comment |
up vote
0
down vote
up vote
0
down vote
does it work? Just replace the example image with your tikz code
documentclass{article}
usepackage{graphicx}
usepackage{subcaption}
usepackage{mwe}
begin{document}
begin{figure*}
centering
%%%%%%%%%start of 1st row%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im1}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im2}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im3}
end{subfigure}
%%%%%%%%%%%%%End of 1st row %%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 2nd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im4}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im5}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im6}
end{subfigure}
%%%%%%%%%%%%% End of 2nd row %%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 3rd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im7}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im8}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im9}
end{subfigure}
%%%%%%%%%%%%%End of 3rd row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 4th row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im10}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im11}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im12}
end{subfigure}
%%%%%%%%%%%%%End of 4th row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{figure*}
end{document}
does it work? Just replace the example image with your tikz code
documentclass{article}
usepackage{graphicx}
usepackage{subcaption}
usepackage{mwe}
begin{document}
begin{figure*}
centering
%%%%%%%%%start of 1st row%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im1}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im2}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im3}
end{subfigure}
%%%%%%%%%%%%%End of 1st row %%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 2nd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im4}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im5}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im6}
end{subfigure}
%%%%%%%%%%%%% End of 2nd row %%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 3rd row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im7}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im8}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im9}
end{subfigure}
%%%%%%%%%%%%%End of 3rd row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
vskipbaselineskip
%%%%%%%%%%%%start of 4th row%%%%%%%%%%%%%%%
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im10}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im11}
end{subfigure}
hfill
begin{subfigure}[b]{0.3textwidth}
centering
includegraphics[width=textwidth]{example.eps}
caption{your caption}
label{im12}
end{subfigure}
%%%%%%%%%%%%%End of 4th row %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{figure*}
end{document}
answered Aug 8 at 13:25
Aritra
83
83
add a comment |
add a comment |
up vote
0
down vote
Using the hint from @PhelypeOleinik that one need resizebox
the following will do the basic grid layout.
documentclass{article}
usepackage{graphicx, tikz, caption}
begin{document}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
dots
end{document}
Each minipage
is using 30 % of the available linewidth
. The gap between the minipage
s get automatically filled by hfill
.
add a comment |
up vote
0
down vote
Using the hint from @PhelypeOleinik that one need resizebox
the following will do the basic grid layout.
documentclass{article}
usepackage{graphicx, tikz, caption}
begin{document}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
dots
end{document}
Each minipage
is using 30 % of the available linewidth
. The gap between the minipage
s get automatically filled by hfill
.
add a comment |
up vote
0
down vote
up vote
0
down vote
Using the hint from @PhelypeOleinik that one need resizebox
the following will do the basic grid layout.
documentclass{article}
usepackage{graphicx, tikz, caption}
begin{document}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
dots
end{document}
Each minipage
is using 30 % of the available linewidth
. The gap between the minipage
s get automatically filled by hfill
.
Using the hint from @PhelypeOleinik that one need resizebox
the following will do the basic grid layout.
documentclass{article}
usepackage{graphicx, tikz, caption}
begin{document}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
hfill
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
begin{minipage}{.3linewidth}
resizebox{linewidth}{!}{%
begin{tikzpicture}
draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$};
draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};...
end{tikzpicture}
}
captionof{figure}{test}
end{minipage}
dots
end{document}
Each minipage
is using 30 % of the available linewidth
. The gap between the minipage
s get automatically filled by hfill
.
answered Aug 8 at 13:33
faltfe
32918
32918
add a comment |
add a comment |
up vote
0
down vote
little late ... but it may help someone :-)
i would draw your diagrams with the pgfplots
package. using it is simple to define size of diagrams in dependency from textwidth
and preserve drawn functions' domains independent from diagram size. it also enable adding diagrams titles with option title
:
documentclass{article}
usepackage[margin=30mm]{geometry} % define page layout
usepackage{pgfplots}
pgfplotsset{compat=1.16}
%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
begin{document}
begin{figure}[htbp]
pgfplotsset{width=0.3linewidth, % digrams' size
scale only axis,
axis lines = middle,
grid,
grid style = {very thin, densely dashed},
xmin=-4.8, xmax=4.8, xtick={-4,-3,...,4}, xticklabels={},
ymin=-4.8, ymax=4.8, ytick={-4,-3,...,4}, yticklabels={},
xlabel=$x$, ylabel=$y$,
xlabel style = {anchor=west, font=footnotesize},
ylabel style = {anchor=south, font=footnotesize},
title style = {yshift=1mm},
%
every axis plot post/.append style={very thick, color=blue!50, smooth},
}
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
caption{Twelve diagrams}
label{fig:twelve}
end{figure}
end{document}
(red lines indicate page layout)
add a comment |
up vote
0
down vote
little late ... but it may help someone :-)
i would draw your diagrams with the pgfplots
package. using it is simple to define size of diagrams in dependency from textwidth
and preserve drawn functions' domains independent from diagram size. it also enable adding diagrams titles with option title
:
documentclass{article}
usepackage[margin=30mm]{geometry} % define page layout
usepackage{pgfplots}
pgfplotsset{compat=1.16}
%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
begin{document}
begin{figure}[htbp]
pgfplotsset{width=0.3linewidth, % digrams' size
scale only axis,
axis lines = middle,
grid,
grid style = {very thin, densely dashed},
xmin=-4.8, xmax=4.8, xtick={-4,-3,...,4}, xticklabels={},
ymin=-4.8, ymax=4.8, ytick={-4,-3,...,4}, yticklabels={},
xlabel=$x$, ylabel=$y$,
xlabel style = {anchor=west, font=footnotesize},
ylabel style = {anchor=south, font=footnotesize},
title style = {yshift=1mm},
%
every axis plot post/.append style={very thick, color=blue!50, smooth},
}
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
caption{Twelve diagrams}
label{fig:twelve}
end{figure}
end{document}
(red lines indicate page layout)
add a comment |
up vote
0
down vote
up vote
0
down vote
little late ... but it may help someone :-)
i would draw your diagrams with the pgfplots
package. using it is simple to define size of diagrams in dependency from textwidth
and preserve drawn functions' domains independent from diagram size. it also enable adding diagrams titles with option title
:
documentclass{article}
usepackage[margin=30mm]{geometry} % define page layout
usepackage{pgfplots}
pgfplotsset{compat=1.16}
%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
begin{document}
begin{figure}[htbp]
pgfplotsset{width=0.3linewidth, % digrams' size
scale only axis,
axis lines = middle,
grid,
grid style = {very thin, densely dashed},
xmin=-4.8, xmax=4.8, xtick={-4,-3,...,4}, xticklabels={},
ymin=-4.8, ymax=4.8, ytick={-4,-3,...,4}, yticklabels={},
xlabel=$x$, ylabel=$y$,
xlabel style = {anchor=west, font=footnotesize},
ylabel style = {anchor=south, font=footnotesize},
title style = {yshift=1mm},
%
every axis plot post/.append style={very thick, color=blue!50, smooth},
}
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
caption{Twelve diagrams}
label{fig:twelve}
end{figure}
end{document}
(red lines indicate page layout)
little late ... but it may help someone :-)
i would draw your diagrams with the pgfplots
package. using it is simple to define size of diagrams in dependency from textwidth
and preserve drawn functions' domains independent from diagram size. it also enable adding diagrams titles with option title
:
documentclass{article}
usepackage[margin=30mm]{geometry} % define page layout
usepackage{pgfplots}
pgfplotsset{compat=1.16}
%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
begin{document}
begin{figure}[htbp]
pgfplotsset{width=0.3linewidth, % digrams' size
scale only axis,
axis lines = middle,
grid,
grid style = {very thin, densely dashed},
xmin=-4.8, xmax=4.8, xtick={-4,-3,...,4}, xticklabels={},
ymin=-4.8, ymax=4.8, ytick={-4,-3,...,4}, yticklabels={},
xlabel=$x$, ylabel=$y$,
xlabel style = {anchor=west, font=footnotesize},
ylabel style = {anchor=south, font=footnotesize},
title style = {yshift=1mm},
%
every axis plot post/.append style={very thick, color=blue!50, smooth},
}
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
medskip
begin{tikzpicture}
begin{axis}[title={$y=x$}]
addplot [domain=-4:4] {x};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^2$}]
addplot [domain=-4:4] {x^2};
end{axis}
end{tikzpicture} hfill
begin{tikzpicture}
begin{axis}[title={$y=x^3$}]
addplot [domain=-4:4] {x^3};
end{axis}
end{tikzpicture}
caption{Twelve diagrams}
label{fig:twelve}
end{figure}
end{document}
(red lines indicate page layout)
edited Dec 6 at 19:08
answered Dec 6 at 18:48
Zarko
119k865155
119k865155
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f445140%2fminipage-subfigure-issue-creating-a-set-of-4x3-graphs-12-total%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
Use
minipage
like you did but add ahfill
between them. To start a new row just add a linebreak. You can add a caption withcaptionof{figure}{your caption}
from thecaption
package or from KOMA-Script if you're using it– faltfe
Aug 8 at 13:05
you don't need subfigure or minipages or anything, just put the tikzpicture one after the other and latex will arrange them into lines, just as it does any other paragraph
– David Carlisle
Aug 8 at 13:07
@faltfe you mean like this? begin{minipage}[b]{0.32linewidth} centering begin{tikzpicture} draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9); draw[->,ultra thick] (-5,0)--(5,0) node[right]{$x$}; draw[->,ultra thick] (0,-5)--(0,5) node[above]{$y$};... end{tikzpicture} end{minipage}hfill begin{minipage}[b]{0.32linewidth} centering ... (didn't work)
– bru1987
Aug 8 at 13:10
1
The problem is that
tikzpicture
works with actual paper dimensions (default iscm
), so you explicitly told it to make a picture larger thantextwidth/3
. You probably wantresizebox
...– Phelype Oleinik
Aug 8 at 13:13
2
please do not edit solutions in to the question it makes it very hard to answer. Also you have not provided an example document that makes it easy for people to see the problem or test answers.
– David Carlisle
Aug 8 at 13:30