von nils_trash@hotmail.com » Mo 20. Mai 2019, 22:54
Vielen Dank, es passt perfekt.
Ich sitze aktuell noch an der Unterschrift (wollte 3 Würfel nebeneinander setzen)
Wenn ich das ganze über minipage realisiere stimmen zwar die Abstände, jedoch bekomme ich eine Fehlermeldung wenn ich eine Unterschrift über caption einfügen möchte.
Wenn ich das ganze über subfigure realisiere passen zwar die Bildunterschriften, jedoch sind die 3 Würfel nicht gleichmäßig verteilt. Gibt es hierfür einen Lösungsvorschlag?
\begin{figure}[h!]
\subfigure[Unterschrift links]{\begin{tikzpicture}[
>=Stealth,
font=\sffamily,
colored ball/.style={draw, circle, ball color=#1, minimum width=0.5cm},
colored ball/.default=yellow
]
% Koordinaten
\path%[scale=3]
foreach \x/\y/\z in
{+/+/+, +/-/+, -/+/+, -/-/+, +/+/-, +/-/-, -/+/-, -/-/-}
{(\x1,\y1,\z1) coordinate (\x\y\z)}
;
% Flächen
\begin{scope}[opacity=0.3]
\fill[blue] (-++) -- (-+-) -- (---) -- (--+) -- cycle;
\fill[red] (+++) -- (++-) -- (+--) -- (+-+) -- cycle;
\end{scope}
%Kanten
\path
(-++) edge (+++) edge (--+) edge (-+-)
(++-) edge (-+-) edge (+--) edge (+++)
(+-+) edge (--+) edge (+++) edge (+--)
;
\path [dashed,thin]
(---) edge (+--) edge (-+-) edge (--+)
;
% Ecken
\path
foreach[count=\i] \c/\ballcolor in
{+++/red, ++-/red, +-+/red, +--/red, -++/blue, -+-/blue, --+/blue}
{(\c)node
[preaction={fill=white, opacity=1}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_\i$}
}
;
\path
foreach[count=\i] \c/\ballcolor in
{---/blue}
{(\c)node
[preaction={fill=white, opacity=0.75}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_8$}
}
;
\end{tikzpicture}}
\subfigure[Unterschrift mitte]{\begin{tikzpicture}[
>=Stealth,
font=\sffamily,
colored ball/.style={draw, circle, ball color=#1, minimum width=0.5cm},
colored ball/.default=yellow
]
% Koordinaten
\path%[scale=3]
foreach \x/\y/\z in
{+/+/+, +/-/+, -/+/+, -/-/+, +/+/-, +/-/-, -/+/-, -/-/-}
{(\x1,\y1,\z1) coordinate (\x\y\z)}
;
% Flächen
\begin{scope}[opacity=0.3]
\fill[blue] (+-+) -- (+--) -- (---) -- (--+) -- cycle;
\fill[red] (+++) -- (++-) -- (-+-) -- (-++) -- cycle;
\end{scope}
%Kanten
\path
(-++) edge (+++) edge (--+) edge (-+-)
(++-) edge (-+-) edge (+--) edge (+++)
(+-+) edge (--+) edge (+++) edge (+--)
;
\path [dashed,thin]
(---) edge (+--) edge (-+-) edge (--+)
;
% Ecken
\path
foreach[count=\i] \c/\ballcolor in
{+++/red, ++-/red, +-+/blue, +--/blue, -++/red, -+-/red, --+/blue}
{(\c)node
[preaction={fill=white, opacity=1}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_\i$}
}
;
\path
foreach[count=\i] \c/\ballcolor in
{---/blue}
{(\c)node
[preaction={fill=white, opacity=0.75}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_8$}
}
;
\end{tikzpicture}}
\subfigure[Unterschrift rechts]{\begin{tikzpicture}[
>=Stealth,
font=\sffamily,
colored ball/.style={draw, circle, ball color=#1, minimum width=0.5cm},
colored ball/.default=yellow
]
% Koordinaten
\path%[scale=3]
foreach \x/\y/\z in
{+/+/+, +/-/+, -/+/+, -/-/+, +/+/-, +/-/-, -/+/-, -/-/-}
{(\x1,\y1,\z1) coordinate (\x\y\z)}
;
% Flächen
\begin{scope}[opacity=0.3]
\fill[blue] (++-) -- (+--) -- (---) -- (-+-) -- cycle;
\fill[red] (+++) -- (+-+) -- (--+) -- (-++) -- cycle;
\end{scope}
%Kanten
\path
(-++) edge (+++) edge (--+) edge (-+-)
(++-) edge (-+-) edge (+--) edge (+++)
(+-+) edge (--+) edge (+++) edge (+--)
;
\path [dashed,thin]
(---) edge (+--) edge (-+-) edge (--+)
;
% Ecken
\path
foreach[count=\i] \c/\ballcolor in
{+++/red, ++-/blue, +-+/red, +--/blue, -++/red, -+-/blue, --+/red}
{(\c)node
[preaction={fill=white, opacity=1}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_\i$}
}
;
\path
foreach[count=\i] \c/\ballcolor in
{---/blue}
{(\c)node
[preaction={fill=white, opacity=0.75}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_8$}
}
;
\end{tikzpicture}}
\caption{Bildunterschrift unter alle}
\label{Verlinkung}
\end{figure}
Vielen Dank, es passt perfekt.
Ich sitze aktuell noch an der Unterschrift (wollte 3 Würfel nebeneinander setzen)
Wenn ich das ganze über minipage realisiere stimmen zwar die Abstände, jedoch bekomme ich eine Fehlermeldung wenn ich eine Unterschrift über caption einfügen möchte.
Wenn ich das ganze über subfigure realisiere passen zwar die Bildunterschriften, jedoch sind die 3 Würfel nicht gleichmäßig verteilt. Gibt es hierfür einen Lösungsvorschlag?
[code]\begin{figure}[h!]
\subfigure[Unterschrift links]{\begin{tikzpicture}[
>=Stealth,
font=\sffamily,
colored ball/.style={draw, circle, ball color=#1, minimum width=0.5cm},
colored ball/.default=yellow
]
% Koordinaten
\path%[scale=3]
foreach \x/\y/\z in
{+/+/+, +/-/+, -/+/+, -/-/+, +/+/-, +/-/-, -/+/-, -/-/-}
{(\x1,\y1,\z1) coordinate (\x\y\z)}
;
% Flächen
\begin{scope}[opacity=0.3]
\fill[blue] (-++) -- (-+-) -- (---) -- (--+) -- cycle;
\fill[red] (+++) -- (++-) -- (+--) -- (+-+) -- cycle;
\end{scope}
%Kanten
\path
(-++) edge (+++) edge (--+) edge (-+-)
(++-) edge (-+-) edge (+--) edge (+++)
(+-+) edge (--+) edge (+++) edge (+--)
;
\path [dashed,thin]
(---) edge (+--) edge (-+-) edge (--+)
;
% Ecken
\path
foreach[count=\i] \c/\ballcolor in
{+++/red, ++-/red, +-+/red, +--/red, -++/blue, -+-/blue, --+/blue}
{(\c)node
[preaction={fill=white, opacity=1}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_\i$}
}
;
\path
foreach[count=\i] \c/\ballcolor in
{---/blue}
{(\c)node
[preaction={fill=white, opacity=0.75}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_8$}
}
;
\end{tikzpicture}}
\subfigure[Unterschrift mitte]{\begin{tikzpicture}[
>=Stealth,
font=\sffamily,
colored ball/.style={draw, circle, ball color=#1, minimum width=0.5cm},
colored ball/.default=yellow
]
% Koordinaten
\path%[scale=3]
foreach \x/\y/\z in
{+/+/+, +/-/+, -/+/+, -/-/+, +/+/-, +/-/-, -/+/-, -/-/-}
{(\x1,\y1,\z1) coordinate (\x\y\z)}
;
% Flächen
\begin{scope}[opacity=0.3]
\fill[blue] (+-+) -- (+--) -- (---) -- (--+) -- cycle;
\fill[red] (+++) -- (++-) -- (-+-) -- (-++) -- cycle;
\end{scope}
%Kanten
\path
(-++) edge (+++) edge (--+) edge (-+-)
(++-) edge (-+-) edge (+--) edge (+++)
(+-+) edge (--+) edge (+++) edge (+--)
;
\path [dashed,thin]
(---) edge (+--) edge (-+-) edge (--+)
;
% Ecken
\path
foreach[count=\i] \c/\ballcolor in
{+++/red, ++-/red, +-+/blue, +--/blue, -++/red, -+-/red, --+/blue}
{(\c)node
[preaction={fill=white, opacity=1}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_\i$}
}
;
\path
foreach[count=\i] \c/\ballcolor in
{---/blue}
{(\c)node
[preaction={fill=white, opacity=0.75}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_8$}
}
;
\end{tikzpicture}}
\subfigure[Unterschrift rechts]{\begin{tikzpicture}[
>=Stealth,
font=\sffamily,
colored ball/.style={draw, circle, ball color=#1, minimum width=0.5cm},
colored ball/.default=yellow
]
% Koordinaten
\path%[scale=3]
foreach \x/\y/\z in
{+/+/+, +/-/+, -/+/+, -/-/+, +/+/-, +/-/-, -/+/-, -/-/-}
{(\x1,\y1,\z1) coordinate (\x\y\z)}
;
% Flächen
\begin{scope}[opacity=0.3]
\fill[blue] (++-) -- (+--) -- (---) -- (-+-) -- cycle;
\fill[red] (+++) -- (+-+) -- (--+) -- (-++) -- cycle;
\end{scope}
%Kanten
\path
(-++) edge (+++) edge (--+) edge (-+-)
(++-) edge (-+-) edge (+--) edge (+++)
(+-+) edge (--+) edge (+++) edge (+--)
;
\path [dashed,thin]
(---) edge (+--) edge (-+-) edge (--+)
;
% Ecken
\path
foreach[count=\i] \c/\ballcolor in
{+++/red, ++-/blue, +-+/red, +--/blue, -++/red, -+-/blue, --+/red}
{(\c)node
[preaction={fill=white, opacity=1}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_\i$}
}
;
\path
foreach[count=\i] \c/\ballcolor in
{---/blue}
{(\c)node
[preaction={fill=white, opacity=0.75}]
[colored ball=\ballcolor, opacity=.5, text opacity=1]
(y\i)
{y$_8$}
}
;
\end{tikzpicture}}
\caption{Bildunterschrift unter alle}
\label{Verlinkung}
\end{figure}[/code]