2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/xor-problem/xor-problem.tex
2016-07-21 20:39:24 +02:00

35 lines
1.3 KiB
TeX

\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{tkz-fct}
\usetikzlibrary{shapes.misc}
\begin{document}
\begin{tikzpicture}
\tikzstyle{point}=[thick,draw=black,cross out,inner sep=0pt,minimum width=4pt,minimum height=4pt]
\begin{axis}[
legend pos=south west,
axis x line=middle,
axis y line=middle,
grid = major,
width=6cm,
height=6cm,
grid style={dashed, gray!30},
xmin=0, % start the diagram at this x-coordinate
xmax=1, % end the diagram at this x-coordinate
ymin=0, % start the diagram at this y-coordinate
ymax=1, % end the diagram at this y-coordinate
xlabel=$x$,
ylabel=$y$,
tick align=outside,
minor tick num=-3,
enlargelimits=true]
% \addplot[domain=0:2.5, red, thick,samples=20] {-x+2.5};
\node[point,label={[label distance=0cm,text=red]135:$0$},red] at (axis cs:1,0) {};
\node[point,label={[label distance=0cm,text=red]-45:$0$},red] at (axis cs:0,1) {};
\node[point,label={[label distance=0cm,text=blue]45:$1$},blue] at (axis cs:0,0) {};
\node[point,label={[label distance=0cm,text=blue]-135:$1$},blue] at (axis cs:1,1) {};
\end{axis}
\end{tikzpicture}
\end{document}