Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 4

05 Jun '17, 23:39

Henri's gravatar image

Henri
15.7k133943

Wenn du die Farbe der Marker setzen möchtest musst du `mark options` verwenden (hat nichts mit `visible on` zu tun). \documentclass[10pt]{beamer} \usepackage{pgfplots} \tikzset{ invisible/.style={opacity=0}, visible on/.style={alt={#1{}{invisible}}}, alt/.code args={<#1>#2#3}{% \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path }, } \begin{document} \frame{\frametitle{Siedetemperaturen im Vergleich} \begin{tikzpicture} \begin{axis}[ xlabel=Anzahl C-Atome, ylabel=Siedetemperatur in $^{\circ}$C, xmajorgrids=true, grid style=dashed, legend style={at={(0.02,0.9)},anchor=west,}, ] \addplot+[visible on=<1->, mark options={color = orange!70, fill = orange!70}, mark = *, only marks ] coordinates { ( 1, -161.7 ) ( 2, -88.6 ) ( 3, -42.2 ) ( 4, -0.5 ) ( 5, 36.1 ) ( 6, 68.7 ) ( 7, 98.4 ) ( 8, 125.6 ) ( 9, 150.7 ) ( 10, 174.0 ) }; \addplot+[visible on=<2->, mark options={color = blue!60, fill = blue!60}, mark = *, only marks ] coordinates { (1, 65) (2, 78) (3, 97) (4, 117) (5, 138) (6, 157) (7, 176) (8, 195) (9, 215) (10, 228) }; \addplot+[visible on=<3->, mark options={color = olive!70, fill = olive!70}, mark = *, only marks ] coordinates { (1, -19) (2, 20) (3, 49) (4, 75) (5, 102) (6, 131) (7, 153) (8, 171) (9, 191) (10, 209) }; \node [draw,fill=white,anchor=north east] at (rel axis cs: 0.99,0.14) {Alkane \textcolor{orange!70}{$\bullet$} $\,$ Alkanale \textcolor{olive!70}{$\bullet$}$\,$ Alkohole \textcolor{blue!60}{$\bullet$}}; \end{axis} \end{tikzpicture} } \end{document} ![alt text][1] Wenn auch die Legende aufgedeckt werden darf statt immer vollständig zu sein, könnte man auch Beamer-Overlays und die `pgfplots`-Legende verwenden. \documentclass[10pt]{beamer} \usepackage{pgfplots} \begin{document} \begin{frame}{Siedetemperaturen im Vergleich} \begin{tikzpicture} \begin{axis}[ xlabel=Anzahl C-Atome, ylabel=Siedetemperatur in $^{\circ}$C, xmajorgrids=true, grid style=dashed, legend columns=3, legend pos=south east, mark=*, only marks, ] \only<1->{ \addplot+[mark \addplot+[mark=*,mark options={color = orange!70, fill = orange!70}] coordinates { ( 1, -161.7 ) ( 2, -88.6 ) ( 3, -42.2 ) ( 4, -0.5 ) ( 5, 36.1 ) ( 6, 68.7 ) ( 7, 98.4 ) ( 8, 125.6 ) ( 9, 150.7 ) ( 10, 174.0 ) }; \addlegendentry{Alkane} } \only<2->{ \addplot+[mark \addplot+[mark=*,mark options={color = blue!60, fill = blue!60}] coordinates { (1, 65) (2, 78) (3, 97) (4, 117) (5, 138) (6, 157) (7, 176) (8, 195) (9, 215) (10, 228) }; \addlegendentry{Alkanale} } \only<3->{ \addplot+[mark \addplot+[mark=*,mark options={color = olive!70, fill = olive!70}] coordinates { (1, -19) (2, 20) (3, 49) (4, 75) (5, 102) (6, 131) (7, 153) (8, 171) (9, 191) (10, 209) }; \addlegendentry{Alkohole} } \end{axis} \end{tikzpicture} \end{frame} \end{document} ![1]: http:/][1]/texwelt.de/wissen/upfiles/test_321.png ![alt text][2] [1]: http://texwelt.de/wissen/upfiles/test_321.png [2]: http://texwelt.de/wissen/upfiles/test_323.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 3

05 Jun '17, 23:38

Henri's gravatar image

Henri
15.7k133943

Wenn du die Farbe der Marker setzen möchtest musst du `mark options` verwenden (hat nichts mit `visible on` zu tun). \documentclass[10pt]{beamer} \usepackage{pgfplots} \tikzset{ invisible/.style={opacity=0}, visible on/.style={alt={#1{}{invisible}}}, alt/.code args={<#1>#2#3}{% \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path }, } \begin{document} \frame{\frametitle{Siedetemperaturen im Vergleich} \begin{tikzpicture} \begin{axis}[ xlabel=Anzahl C-Atome, ylabel=Siedetemperatur in $^{\circ}$C, xmajorgrids=true, grid style=dashed, legend style={at={(0.02,0.9)},anchor=west,}, ] \addplot+[visible on=<1->, mark options={color = orange!70, fill = orange!70}, mark = *, only marks ] coordinates { ( 1, -161.7 ) ( 2, -88.6 ) ( 3, -42.2 ) ( 4, -0.5 ) ( 5, 36.1 ) ( 6, 68.7 ) ( 7, 98.4 ) ( 8, 125.6 ) ( 9, 150.7 ) ( 10, 174.0 ) }; \addplot+[visible on=<2->, mark options={color = blue!60, fill = blue!60}, mark = *, only marks ] coordinates { (1, 65) (2, 78) (3, 97) (4, 117) (5, 138) (6, 157) (7, 176) (8, 195) (9, 215) (10, 228) }; \addplot+[visible on=<3->, mark options={color = olive!70, fill = olive!70}, mark = *, only marks ] coordinates { (1, -19) (2, 20) (3, 49) (4, 75) (5, 102) (6, 131) (7, 153) (8, 171) (9, 191) (10, 209) }; \node [draw,fill=white,anchor=north east] at (rel axis cs: 0.99,0.14) {Alkane \textcolor{orange!70}{$\bullet$} $\,$ Alkanale \textcolor{olive!70}{$\bullet$}$\,$ Alkohole \textcolor{blue!60}{$\bullet$}}; \end{axis} \end{tikzpicture} } \end{document} ![alt text][1] Wenn auch die Legende aufgedeckt werden darf statt immer vollständig zu sein, könnte man auch Beamer-Overlays und die `pgfplots`-Legende verwenden. \documentclass[10pt]{beamer} \usepackage{pgfplots} \begin{document} \begin{frame}{Siedetemperaturen im Vergleich} \begin{tikzpicture} \begin{axis}[ xlabel=Anzahl C-Atome, ylabel=Siedetemperatur in $^{\circ}$C, xmajorgrids=true, grid style=dashed, legend columns=3, legend pos=south east, mark=*, only marks, ] \only<1->{ \addplot+[mark options={color = orange!70, fill = orange!70}] coordinates { ( 1, -161.7 ) ( 2, -88.6 ) ( 3, -42.2 ) ( 4, -0.5 ) ( 5, 36.1 ) ( 6, 68.7 ) ( 7, 98.4 ) ( 8, 125.6 ) ( 9, 150.7 ) ( 10, 174.0 ) }; \addlegendentry{Alkane} } \only<2->{ \addplot+[mark options={color = blue!60, fill = blue!60}] coordinates { (1, 65) (2, 78) (3, 97) (4, 117) (5, 138) (6, 157) (7, 176) (8, 195) (9, 215) (10, 228) }; \addlegendentry{Alkanale} } \only<3->{ \addplot+[mark options={color = olive!70, fill = olive!70}] coordinates { (1, -19) (2, 20) (3, 49) (4, 75) (5, 102) (6, 131) (7, 153) (8, 171) (9, 191) (10, 209) }; \addlegendentry{Alkohole} } \end{axis} \end{tikzpicture} \end{frame} \end{document} ![1]: http:/][1]/texwelt.de/wissen/upfiles/test_321.png [1]: http://texwelt.de/wissen/upfiles/test_321.pnghttp://texwelt.de/wissen/upfiles/test_323.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

05 Jun '17, 23:29

Henri's gravatar image

Henri
15.7k133943

Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

05 Jun '17, 23:28

Henri's gravatar image

Henri
15.7k133943