von cis » Di 25. Aug 2020, 06:54
Ich schätze mal irgendwie so:
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[title={G\"odel 1932}, xtick={0,0.5,1}, ytick={0,0.5,1}, ztick={0,0.5,1},
xlabel=$p$, ylabel=$q$, zmin=0, zmax=1, small]
\addplot3[surf, cyan,
domain=0:1, domain y=0:1,
restrict z to domain=1:1,
]{ (x <= y ) * (1) };
\addplot3[surf, cyan,
domain=0:1, domain y=0:1,
restrict z to domain=0.000001:1,% vielleicht so
]{ (x > y) * (y) };
\end{axis}
\end{tikzpicture}
\end{document}
Aber ob das wirklich das Bild ist, was da rauskommen soll?
PPS: Also der 2. addplot ist m.E. so nicht gelungen; mit dieser Schummellösung restrict z to domain=0.000001:1
PPS: Wie ich die Optik hier zusammenschummel mit Hilfsgraden und fill between ist mir direkt klar, aber:
Es wäre hier, im Sinne der Eleganz, natürlich wünschenswert, wenn das einer ausgehend von Deiner Funktionsangabe {(x <= y) * (1) +(x > y) * (y)}, vielleicht sogar als einen (entsprechend gefilterten) addplot, lösen kann.
Ich schätze mal irgendwie so:
[code]\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[title={G\"odel 1932}, xtick={0,0.5,1}, ytick={0,0.5,1}, ztick={0,0.5,1},
xlabel=$p$, ylabel=$q$, zmin=0, zmax=1, small]
\addplot3[surf, cyan,
domain=0:1, domain y=0:1,
restrict z to domain=1:1,
]{ (x <= y ) * (1) };
\addplot3[surf, cyan,
domain=0:1, domain y=0:1,
restrict z to domain=0.000001:1,% vielleicht so
]{ (x > y) * (y) };
\end{axis}
\end{tikzpicture}
\end{document}[/code]
Aber ob das wirklich das Bild ist, was da rauskommen soll?
[attachment=0]55555a5.png[/attachment]
PPS: Also der 2. addplot ist m.E. so nicht gelungen; mit dieser Schummellösung [tt]restrict z to domain=0.000001:1[/tt]
PPS: [i]Wie ich die Optik hier zusammenschummel mit Hilfsgraden und fill between ist mir direkt klar, aber:
Es wäre hier, im Sinne der Eleganz, natürlich wünschenswert, wenn das einer ausgehend von Deiner Funktionsangabe [tt]{(x <= y) * (1) +(x > y) * (y)}[/tt], vielleicht sogar als einen (entsprechend gefilterten) addplot, lösen kann. [/i]