Skip to content

Instantly share code, notes, and snippets.

@takumim
Last active July 27, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takumim/2cfefa4487accf70cffb053e6070f1a1 to your computer and use it in GitHub Desktop.
Save takumim/2cfefa4487accf70cffb053e6070f1a1 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[12pt]{article}
\usepackage{stix}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=0:5]
\path[fill=gray!20] (0,3) -- (4,0) -- (4.9,0) -- (4.9,3.9) -- (0,3.9) -- (0,3);
\draw[very thin,color=gray] (-0.1,-0.1) grid (4.9,3.9);
\draw[->] (-0.2,0) -- (5.1,0);
\draw[->] (0,-0.2) -- (0,4.1);
\filldraw[black] (0,3) circle (2pt);
\filldraw[black] (3,1) circle (2pt);
\filldraw[black] (4,0) circle (2pt);
\draw[dashed] (0,3) -- (4,0);
\end{tikzpicture}
\end{document}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[12pt]{article}
\usepackage{stix}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzpicture}[domain=0:2]
\path[fill=gray!20] (0,1) -- (1,0) -- (1.9,0) -- (1.9,3.9) -- (0,3.9) -- (0,1);
\draw[very thin,color=gray] (-0.1,-0.1) grid (1.9,3.9);
\draw[-cm to] (-0.2,0) -- (2.1,0);
\draw[-cm to] (0,-0.2) -- (0,4.1);
\filldraw[black] (1,1) circle (2pt);
\filldraw[black] (1,0) circle (2pt);
\filldraw[black] (0,3) circle (2pt);
\filldraw[black] (0,2) circle (2pt);
\filldraw[black] (0,1) circle (2pt);
\draw[dashed] (0,1) -- (1,0);
\end{tikzpicture}
\end{document}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass[12pt]{article}
\usepackage{stix}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzpicture}[domain=0:3]
\path[fill=gray!20] (0,1) -- (2,0) -- (2.9,0) -- (2.9,3.9) -- (0,3.9) -- (0,1);
\draw[very thin,color=gray] (-0.1,-0.1) grid (2.9,3.9);
\draw[-cm to] (-0.2,0) -- (3.1,0);
\draw[-cm to] (0,-0.2) -- (0,4.1);
\filldraw[black] (2,3) circle (2pt);
\filldraw[black] (2,2) circle (2pt);
\filldraw[black] (2,1) circle (2pt);
\filldraw[black] (2,0) circle (2pt);
\filldraw[black] (1,2) circle (2pt);
\filldraw[black] (1,1) circle (2pt);
\filldraw[black] (0,1) circle (2pt);
\draw[dashed] (0,1) -- (2,0);
\end{tikzpicture}
\end{document}
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="288pt" height="170pt" viewBox="0 0 288 170" version="1.1">
<defs>
<clipPath id="clip1">
<path d="M 7 0 L 9 0 L 9 169.660156 L 7 169.660156 Z M 7 0 "/>
</clipPath>
<clipPath id="clip2">
<path d="M 233 151 L 255 151 L 255 169.660156 L 233 169.660156 Z M 233 151 "/>
</clipPath>
<clipPath id="clip3">
<path d="M 155 151 L 177 151 L 177 169.660156 L 155 169.660156 Z M 155 151 "/>
</clipPath>
<clipPath id="clip4">
<path d="M 115 151 L 137 151 L 137 169.660156 L 115 169.660156 Z M 115 151 "/>
</clipPath>
<clipPath id="clip5">
<path d="M 76 151 L 98 151 L 98 169.660156 L 76 169.660156 Z M 76 151 "/>
</clipPath>
<clipPath id="clip6">
<path d="M 37 151 L 59 151 L 59 169.660156 L 37 169.660156 Z M 37 151 "/>
</clipPath>
<clipPath id="clip7">
<path d="M 0 114 L 56 114 L 56 169.660156 L 0 169.660156 Z M 0 114 "/>
</clipPath>
</defs>
<g id="surface1">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(89.99939%,89.99939%,89.99939%);fill-opacity:1;" d="M 8.273438 122.308594 L 47.605469 161.636719 L 279.660156 161.636719 L 279.660156 8.246094 L 8.273438 8.246094 L 8.273438 122.308594 "/>
<path style="fill:none;stroke-width:0.19925;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(50%,50%,50%);stroke-opacity:1;stroke-miterlimit:10;" d="M -2.833532 0.000986126 L 195.592707 0.000986126 M -2.833532 28.345581 L 195.592707 28.345581 M -2.833532 56.692991 L 195.592707 56.692991 M -2.833532 85.040401 L 195.592707 85.040401 M -0.00132432 -2.834036 L -0.00132432 110.552788 M 28.346086 -2.834036 L 28.346086 110.552788 M 56.693495 -2.834036 L 56.693495 110.552788 M 85.040905 -2.834036 L 85.040905 110.552788 M 113.388315 -2.834036 L 113.388315 110.552788 M 141.73291 -2.834036 L 141.73291 110.552788 M 170.08032 -2.834036 L 170.08032 110.552788 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -5.668554 0.000986126 L 200.862977 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style="fill:none;stroke-width:0.3985;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -2.072432 2.391189 C -1.692365 0.955378 -0.850586 0.279702 -0.00036036 0.000986126 C -0.850586 -0.27773 -1.692365 -0.956221 -2.072432 -2.392032 " transform="matrix(1.3875,0,0,-1.3875,287.2505,161.638087)"/>
<g clip-path="url(#clip1)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -0.00132432 -5.669059 L -0.00132432 115.823058 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
<path style="fill:none;stroke-width:0.3985;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -2.071964 2.391527 C -1.694712 0.955716 -0.850117 0.280041 0.000108108 0.00132432 C -0.850117 -0.280207 -1.694712 -0.955883 -2.071964 -2.391694 " transform="matrix(0,-1.3875,-1.3875,0,8.275275,0.6564)"/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 172.073563 85.040401 C 172.073563 86.141189 171.181108 87.033644 170.08032 87.033644 C 168.979532 87.033644 168.087077 86.141189 168.087077 85.040401 C 168.087077 83.939612 168.979532 83.047157 170.08032 83.047157 C 171.181108 83.047157 172.073563 83.939612 172.073563 85.040401 Z M 172.073563 85.040401 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 172.073563 56.692991 C 172.073563 57.793779 171.181108 58.686234 170.08032 58.686234 C 168.979532 58.686234 168.087077 57.793779 168.087077 56.692991 C 168.087077 55.592202 168.979532 54.699747 170.08032 54.699747 C 171.181108 54.699747 172.073563 55.592202 172.073563 56.692991 Z M 172.073563 56.692991 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 172.073563 28.345581 C 172.073563 29.446369 171.181108 30.338824 170.08032 30.338824 C 168.979532 30.338824 168.087077 29.446369 168.087077 28.345581 C 168.087077 27.247608 168.979532 26.355153 170.08032 26.355153 C 171.181108 26.355153 172.073563 27.247608 172.073563 28.345581 Z M 172.073563 28.345581 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 247.027344 161.636719 C 247.027344 160.109375 245.789062 158.875 244.261719 158.875 C 242.734375 158.875 241.496094 160.109375 241.496094 161.636719 C 241.496094 163.164062 242.734375 164.402344 244.261719 164.402344 C 245.789062 164.402344 247.027344 163.164062 247.027344 161.636719 Z M 247.027344 161.636719 "/>
<g clip-path="url(#clip2)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 172.073563 0.000986126 C 172.073563 1.101774 171.181108 1.991414 170.08032 1.991414 C 168.979532 1.991414 168.087077 1.101774 168.087077 0.000986126 C 168.087077 -1.099802 168.979532 -1.992257 170.08032 -1.992257 C 171.181108 -1.992257 172.073563 -1.099802 172.073563 0.000986126 Z M 172.073563 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 115.378743 56.692991 C 115.378743 57.793779 114.489104 58.686234 113.388315 58.686234 C 112.287527 58.686234 111.395072 57.793779 111.395072 56.692991 C 111.395072 55.592202 112.287527 54.699747 113.388315 54.699747 C 114.489104 54.699747 115.378743 55.592202 115.378743 56.692991 Z M 115.378743 56.692991 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 115.378743 28.345581 C 115.378743 29.446369 114.489104 30.338824 113.388315 30.338824 C 112.287527 30.338824 111.395072 29.446369 111.395072 28.345581 C 111.395072 27.247608 112.287527 26.355153 113.388315 26.355153 C 114.489104 26.355153 115.378743 27.247608 115.378743 28.345581 Z M 115.378743 28.345581 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 168.363281 161.636719 C 168.363281 160.109375 167.128906 158.875 165.601562 158.875 C 164.074219 158.875 162.835938 160.109375 162.835938 161.636719 C 162.835938 163.164062 164.074219 164.402344 165.601562 164.402344 C 167.128906 164.402344 168.363281 163.164062 168.363281 161.636719 Z M 168.363281 161.636719 "/>
<g clip-path="url(#clip3)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 115.378743 0.000986126 C 115.378743 1.101774 114.489104 1.991414 113.388315 1.991414 C 112.287527 1.991414 111.395072 1.101774 111.395072 0.000986126 C 111.395072 -1.099802 112.287527 -1.992257 113.388315 -1.992257 C 114.489104 -1.992257 115.378743 -1.099802 115.378743 0.000986126 Z M 115.378743 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 87.034149 56.692991 C 87.034149 57.793779 86.141694 58.686234 85.040905 58.686234 C 83.940117 58.686234 83.047662 57.793779 83.047662 56.692991 C 83.047662 55.592202 83.940117 54.699747 85.040905 54.699747 C 86.141694 54.699747 87.034149 55.592202 87.034149 56.692991 Z M 87.034149 56.692991 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 87.034149 28.345581 C 87.034149 29.446369 86.141694 30.338824 85.040905 30.338824 C 83.940117 30.338824 83.047662 29.446369 83.047662 28.345581 C 83.047662 27.247608 83.940117 26.355153 85.040905 26.355153 C 86.141694 26.355153 87.034149 27.247608 87.034149 28.345581 Z M 87.034149 28.345581 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 129.035156 161.636719 C 129.035156 160.109375 127.796875 158.875 126.269531 158.875 C 124.742188 158.875 123.503906 160.109375 123.503906 161.636719 C 123.503906 163.164062 124.742188 164.402344 126.269531 164.402344 C 127.796875 164.402344 129.035156 163.164062 129.035156 161.636719 Z M 129.035156 161.636719 "/>
<g clip-path="url(#clip4)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 87.034149 0.000986126 C 87.034149 1.101774 86.141694 1.991414 85.040905 1.991414 C 83.940117 1.991414 83.047662 1.101774 83.047662 0.000986126 C 83.047662 -1.099802 83.940117 -1.992257 85.040905 -1.992257 C 86.141694 -1.992257 87.034149 -1.099802 87.034149 0.000986126 Z M 87.034149 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 58.686739 28.345581 C 58.686739 29.446369 57.794284 30.338824 56.693495 30.338824 C 55.592707 30.338824 54.700252 29.446369 54.700252 28.345581 C 54.700252 27.247608 55.592707 26.355153 56.693495 26.355153 C 57.794284 26.355153 58.686739 27.247608 58.686739 28.345581 Z M 58.686739 28.345581 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 89.703125 161.636719 C 89.703125 160.109375 88.464844 158.875 86.9375 158.875 C 85.410156 158.875 84.171875 160.109375 84.171875 161.636719 C 84.171875 163.164062 85.410156 164.402344 86.9375 164.402344 C 88.464844 164.402344 89.703125 163.164062 89.703125 161.636719 Z M 89.703125 161.636719 "/>
<g clip-path="url(#clip5)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 58.686739 0.000986126 C 58.686739 1.101774 57.794284 1.991414 56.693495 1.991414 C 55.592707 1.991414 54.700252 1.101774 54.700252 0.000986126 C 54.700252 -1.099802 55.592707 -1.992257 56.693495 -1.992257 C 57.794284 -1.992257 58.686739 -1.099802 58.686739 0.000986126 Z M 58.686739 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 30.339329 28.345581 C 30.339329 29.446369 29.446874 30.338824 28.346086 30.338824 C 27.245297 30.338824 26.355658 29.446369 26.355658 28.345581 C 26.355658 27.247608 27.245297 26.355153 28.346086 26.355153 C 29.446874 26.355153 30.339329 27.247608 30.339329 28.345581 Z M 30.339329 28.345581 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 50.371094 161.636719 C 50.371094 160.109375 49.132812 158.875 47.605469 158.875 C 46.078125 158.875 44.84375 160.109375 44.84375 161.636719 C 44.84375 163.164062 46.078125 164.402344 47.605469 164.402344 C 49.132812 164.402344 50.371094 163.164062 50.371094 161.636719 Z M 50.371094 161.636719 "/>
<g clip-path="url(#clip6)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 30.339329 0.000986126 C 30.339329 1.101774 29.446874 1.991414 28.346086 1.991414 C 27.245297 1.991414 26.355658 1.101774 26.355658 0.000986126 C 26.355658 -1.099802 27.245297 -1.992257 28.346086 -1.992257 C 29.446874 -1.992257 30.339329 -1.099802 30.339329 0.000986126 Z M 30.339329 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
<path style="fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 1.991919 28.345581 C 1.991919 29.446369 1.099464 30.338824 -0.00132432 30.338824 C -1.099297 30.338824 -1.991752 29.446369 -1.991752 28.345581 C -1.991752 27.247608 -1.099297 26.355153 -0.00132432 26.355153 C 1.099464 26.355153 1.991919 27.247608 1.991919 28.345581 Z M 1.991919 28.345581 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
<g clip-path="url(#clip7)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.3985;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-dasharray:2.98883,2.98883;stroke-miterlimit:10;" d="M -0.00132432 28.345581 L 28.346086 0.000986126 " transform="matrix(1.3875,0,0,-1.3875,8.275275,161.638087)"/>
</g>
</g>
</svg>
\documentclass[12pt]{article}
\usepackage{stix}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzpicture}[domain=0:7]
\path[fill=gray!20] (0,1) -- (1,0) -- (6.9,0) -- (6.9,3.9) -- (0,3.9) -- (0,1);
\draw[very thin,color=gray] (-0.1,-0.1) grid (6.9,3.9);
\draw[-cm to] (-0.2,0) -- (7.1,0);
\draw[-cm to] (0,-0.2) -- (0,4.1);
\filldraw[black] (6,3) circle (2pt);
\filldraw[black] (6,2) circle (2pt);
\filldraw[black] (6,1) circle (2pt);
\filldraw[black] (6,0) circle (2pt);
\filldraw[black] (4,2) circle (2pt);
\filldraw[black] (4,1) circle (2pt);
\filldraw[black] (4,0) circle (2pt);
\filldraw[black] (3,2) circle (2pt);
\filldraw[black] (3,1) circle (2pt);
\filldraw[black] (3,0) circle (2pt);
\filldraw[black] (2,1) circle (2pt);
\filldraw[black] (2,0) circle (2pt);
\filldraw[black] (1,1) circle (2pt);
\filldraw[black] (1,0) circle (2pt);
\filldraw[black] (0,1) circle (2pt);
\draw[dashed] (0,1) -- (1,0);
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment