Guest User

Untitled

a guest
Jun 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. % Tikz File 'mytikz.tex'
  2. documentclass{standalone}
  3. usepackage{standalone}
  4. %usepackage[margin=1in, lmargin=1.75cm, rmargin=1.75cm]{geometry}
  5. standaloneconfig{mode=image|tex}
  6. usepackage{tikz}
  7. %usetikzlibrary{...}
  8. usetikzlibrary{decorations.pathreplacing}
  9. usetikzlibrary{arrows.meta,calc}
  10. begin{document}
  11. definecolor{light-gray}{gray}{0.98}
  12. definecolor{darkgreen}{RGB}{0,64,0}
  13. definecolor{lightgray}{gray}{0.75}
  14. definecolor{lightred}{RGB}{255,200,200}
  15. definecolor{lightblue}{RGB}{200,200,255}
  16. definecolor{lightgreen}{RGB}{200,255,200}
  17. definecolor{pink}{RGB}{255,128,128}
  18. begin{tikzpicture}
  19. %useasboundingbox(0.8,0) (4.1,4.6);
  20. defopacity{0.75}
  21. defxcellsa{{"A","B","C","D"}}
  22.  
  23. defxcellsb{{"4","3","2","1"}}
  24.  
  25. %bc slice
  26. filldraw[lightblue, opacity=0.5] (1,0) rectangle (3,4);
  27. draw[step=1,black, opacity=opacity, fill opacity=0] (1,0) grid (3,4);
  28. %23slice
  29. filldraw[lightblue, opacity=0.5] (0,1) rectangle (4,3);
  30. draw[step=1,black, opacity=opacity, fill opacity=0] (0,1) grid (4,3);
  31. %core
  32. draw[fill = white, thick, dashed] (2,2) circle (0.5cm);
  33. node[fill = white, opacity=1] at (2,2) {core};
  34. %coordinate
  35. draw[fill = black] (1.5,2.6) circle (0.1cm);
  36. node at (1.5, 2.6) (A) {};
  37. node at (0.8,4.4) (B) {};
  38. draw[-Stealth, semithick] (B) to [bend right] (A);
  39. node[fill=white, opacity=1] at (1,4.4) {anchor};
  40.  
  41. foreach xa in {1,2} {
  42. node[align=center] at ({xa+0.5},{4-0.5}) {pgfmathparse{xcellsa[xa]}pgfmathresult};
  43. }
  44. foreach ya in {1,2} {
  45. node[align=center] at ({0.5},{ya+0.5}) {pgfmathparse{xcellsb[ya]}pgfmathresult};
  46. }
  47. end{tikzpicture}
  48. end{document}
Add Comment
Please, Sign In to add comment