texture.tex 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{pgfplots}
  3. \usepackage{tikz}
  4. \usepackage{nicefrac}
  5. \begin{document}
  6. \begin{tikzpicture}
  7. \begin{axis}[
  8. legend pos=south west,
  9. axis x line=middle,
  10. axis y line=middle,
  11. grid = major,
  12. %width=9cm,
  13. %height=4.5cm,
  14. grid style={dashed, gray!30},
  15. xmin=-1.25, % start the diagram at this x-coordinate
  16. xmax= 1.25, % end the diagram at this x-coordinate
  17. ymin=-0.75, % start the diagram at this y-coordinate
  18. ymax= 1.75, % end the diagram at this y-coordinate
  19. axis background/.style={fill=white},
  20. xlabel=$s$,
  21. ylabel=$t$,
  22. %xticklabels={-2,-1.6,...,7},
  23. %yticklabels={-8,-7,...,8},
  24. tick align=outside,
  25. minor tick num=-3,
  26. enlargelimits=true,
  27. tension=0.08]
  28. % \draw(axis cs:0,0) -- (axis cs:0.5,0) -- (axis cs:0.5,0.5) -- (axis cs:0,0.5) -- (axis cs:0,0);
  29. % \node[draw] at (axis cs:0,0) {A};
  30. \draw[fill=black!25] (axis cs:0.0,-.7) rectangle (axis cs:0.5,0.5) node[pos=.5] {C};
  31. \draw[fill=white] (axis cs:0.5,-.7) rectangle (axis cs:1.0,0.5) node[pos=.5] {D};
  32. \draw[fill=white] (axis cs:0.0,0.5) rectangle (axis cs:0.5,1.7) node[pos=.5] {A};
  33. \draw[fill=black!25] (axis cs:0.5,0.5) rectangle (axis cs:1.0,1.7) node[pos=.5] {B};
  34. \draw[fill=black!25] (axis cs:1.0,-.7) rectangle (axis cs:1.5,0.5) node[pos=.5] {C};
  35. \draw[fill=white] (axis cs:1.0,0.5) rectangle (axis cs:1.5,1.7) node[pos=.5] {A};
  36. \draw[fill=black!25] (axis cs:-0.5,0.5) rectangle (axis cs:0.0,1.7) node[pos=.5] {B};
  37. \draw[fill=white] (axis cs:-0.5,-.7) rectangle (axis cs:0.0,0.5) node[pos=.5] {D};
  38. \draw[fill=black!25] (axis cs:-0.5,-.7) rectangle (axis cs:-1.0,0.5) node[pos=.5] {C};
  39. \draw[fill=white] (axis cs:-0.5,0.5) rectangle (axis cs:-1.0,1.7) node[pos=.5] {A};
  40. \draw[fill=black!25] (axis cs:-1.5,0.5) rectangle (axis cs:-1.0,1.7) node[pos=.5] {B};
  41. \draw[fill=white] (axis cs:-1.5,-.7) rectangle (axis cs:-1.0,0.5) node[pos=.5] {D};
  42. \node[label={180:{1}},circle,fill,inner sep=2pt] at (axis cs:-0.5,-0.5) {};
  43. \node[label={180:{2}},circle,fill,inner sep=2pt] at (axis cs:1,-0.5) {};
  44. \node[label={180:{3}},circle,fill,inner sep=2pt] at (axis cs:1,1.5) {};
  45. \node[label={180:{4}},circle,fill,inner sep=2pt] at (axis cs:-0.5,1.5) {};
  46. \end{axis}
  47. \end{tikzpicture}
  48. \end{document}