AIGrounding/Diagram-MMU huggingface dataset:
\documentclass[tikz,border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill=black!30](6,0)--(5,-1.5)--(7,-1.5)--cycle;
\draw[black!30,fill=black!15](6.5,-1.5)--(7,-2.25)--(6,-2.25)--cycle;
\filldraw(6,0)circle(2pt);
\draw[fill=black!15](6.5,-1.5)circle(2pt);
\draw(5,0)node{$T[T'/a]$};
\draw(6.5,-1.3)node{$a$};
\draw[fill=black!30](3,0)--(2,-1.5)--(4,-1.5)--cycle;
\filldraw(3,0)circle(2pt);
\draw[fill=black!15](3.5,-1.5)circle(2pt);
\draw(2.2,0)node{$T$};
\draw(3.5,-1.25)node{$a$};
\draw[black!30,fill=black!15](3.5,-2)--(4,-2.75)--(3,-2.75)--cycle;
\draw[fill=black!15](3.5,-2)circle(2pt);
\draw(3.1,-2)node{$T'$};
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\usepgfplotslibrary{colorbrewer}
\pgfplotsset{cycle list/Dark2,cycle multiindex* list={mark list*\nextlist Dark2\nextlist}
,every axis plot/.append style={line width=1pt},compat=newest}\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\begin{axis}[symbolic x coords={OPT 350M, OPT 1.3B,OPT 2.7B,OPT 6.7B},xticklabels={350M,1.3B,2.7B,6.7B\\(Self-Ranking)},xtick=data,xlabel=$\mathcal{LP}(1)$ Ranking Source,x tick label style={text width=4cm,align=center},legend style={at={(0.5,1.15)}, anchor=north, legend columns=3, legend cell align={left}, column sep=0.25em},ylabel=Win rate,enlarge y limits=0.1,enlarge x limits=0.07,]\addplot coordinates {(OPT 350M,51.24) (OPT 1.3B,51.76) (OPT 2.7B,51.22) (OPT 6.7B,51.08)};
\addplot coordinates {(OPT 350M,52.01) (OPT 1.3B,52.11) (OPT 2.7B,52.84) (OPT 6.7B,51.49)};
\addplot coordinates {(OPT 350M,51.61) (OPT 1.3B,52.80) (OPT 2.7B,53.15) (OPT 6.7B,52.16)};
\legend{10\% Low, 25\% Low, 33\% Low}
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.18}
\pgfplotstableread{
dof l2_err level
5 8.312e-02 2
17 2.547e-02 3
49 7.407e-03 4
129 2.102e-03 5
321 5.874e-04 6
769 1.623e-04 7
1793 4.442e-05 8
4097 1.207e-05 9
9217 3.261e-06 10
}\datadatadB
\pgfplotstableread{
dof l2_err level
7 8.472e-02 2
31 3.044e-02 3
111 1.022e-02 4
351 3.303e-03 5
1023 1.039e-03 6
2815 3.196e-04 7
7423 9.658e-05 8
18943 2.873e-05 9
47103 8.437e-06 10
}\datadatadC
\pgfplotstableread{
dof l2_err level
9 7.881e-02 2
49 3.243e-02 3
209 1.232e-02 4
769 4.454e-03 5
2561 1.551e-03 6
7937 5.236e-04 7
23297 1.723e-04 8
65537 5.545e-05 9
178177 1.751e-05 10
}\datadatadD
\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[
title=Convergence Plot,
xlabel={Degrees of freedom},
ylabel={$L_2$ Error},
grid=major,
legend entries={$d=2$,$d=3$,$d=4$},
]
\addplot table {\datadatadB};
\addplot table {\datadatadC};
\addplot table {\datadatadD};
\end{loglogaxis}
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) to[R, d-o] (2,0);
\end{circuitikz}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}

\ctikzset{led arrows from anode}
\ctikzset{pd arrows to anode}


\ctikzset{full diodes}
\draw (0,0) to[leD] ++(1.5,0) to[pD] ++(1.5,0);


\ctikzset{stroke diodes}
\draw (0,-1) to[leD] ++(1.5,0) to[pD] ++(1.5,0);


\ctikzset{empty diodes}
\draw (0,-2) to[leD] ++(1.5,0) to[pD] ++(1.5,0);


\ctikzset{led arrows from cathode}
\ctikzset{pd arrows to cathode}

\ctikzset{full diodes}
\draw (0,-4) to[leD] ++(1.5,0) to[pD] ++(1.5,0);

\ctikzset{stroke diodes}
\draw (0,-5) to[leD] ++(1.5,0) to[pD] ++(1.5,0);

\ctikzset{empty diodes}
\draw (0,-6) to[leD] ++(1.5,0) to[pD] ++(1.5,0);
\end{circuitikz}
\end{document}
\documentclass[tikz, border=2pt]{standalone}
\begin{document}
\begin{tikzpicture}
\node[circle, draw, fill=black, inner sep=1.5pt] (myNode) at (0,0) {};
\node[right] at (myNode.east) {$k$};
\draw[-] (myNode) -- ++(90:1.2cm) node[midway, above, pos=1.0] {$(k,j)$};
\draw[-] (myNode) -- ++(215:2.25cm) node[midway, below, pos=1.0] {$(k,i_1)$};
\draw[-] (myNode) -- ++(240:1.5cm) node[midway, below, pos=1.0] {$(k,i_2)$};
\draw[-] (myNode) -- ++(325:2.25cm) node[midway, below, pos=1.0] {$(k,i_p)$};
\node at (.5,-1) {\ldots};
\end{tikzpicture}
\end{document}
\documentclass[tikz, border=2pt]{standalone}
\begin{document}
\begin{tikzpicture}
\foreach \x in {0,1,2,3,4}{
\draw[thick] (\x*72-54:3) -- (\x*72+18:3);
\draw[fill] (\x*72-54:3) circle (0.1);
}
\foreach \x in {0,1,2}{
\draw[thick] (\x*72-54:3) -- (18:1);
\draw[thick] (\x*72+90:3) -- (162:1);
}
\draw[fill] (18:1) circle (0.1);
\draw[fill] (162:1) circle (0.1);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{tikz}
\usetikzlibrary{
datavisualization,
datavisualization.formats.functions
}
\usepackage{amsmath,amssymb}
\begin{document}
\tikz \datavisualization data group {function classes} = {
data [set=log, format=function] {
var x : interval [0.2:2.5];
func y = ln(\value x);
}
data [set=lin, format=function] {
var x : interval [-2:2.5];
func y = 0.5*\value x;
}
data [set=squared, format=function] {
var x : interval [-1.5:1.5];
func y = \value x*\value x;
}
data [set=exp, format=function] {
var x : interval [-2.5:1];
func y = exp(\value x);
}
};
\tikz \datavisualization [
scientific axes,
visualize as smooth line/.list=
{log, lin, squared, exp},
legend={label style=text left},
log= {label in legend={text=$\log x$}},
lin= {label in legend={text=$x/2$}},
squared={label in legend={text=$x^2$}},
exp= {label in legend={text=$e^x$}},
style sheet=strong colors]
data group {function classes};
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{tikz}
\tikzset{
help lines/.style={gray,very thin},
}
\begin{document}
\begin{tikzpicture}
\draw[help lines] (0,0) grid (3,2);
\draw (0,0) -- (2,1) -- (1,0);
\pgftransformxslant{.5}
\draw[red] (0,0) -- (2,1) -- (1,0);
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot+ [
ybar,
] coordinates {
(0,3) (1,2) (2,4) (3,1) (4,2)
};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{tikz-network}
\begin{document}
\begin{tikzpicture}
\Vertex{A}
\Edge[loopshape=45](A)(A)
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,matrix,decorations.pathmorphing,shapes}
\tikzset{prop/.style={draw,ultra thick}
,vertex/.style={circle,thick,draw=black,fill=black!20,minimum size=18pt,inner sep=3pt},empty/.style={circle,thick,draw=black,minimum size=18pt,inner sep=3pt},outtraj/.style={rectangle,thick,minimum size=18pt,inner sep=3pt},outdens/.style={rectangle,thick,draw=black,fill=black!20,minimum size=18pt,inner sep=3pt},outdensempty/.style={rectangle,thick,draw=black,minimum size=18pt,inner sep=3pt},subdiagr/.style={star,star points=7,star point ratio=0.8,thick,draw=black,fill=black!20,minimum size=18pt,inner sep=3pt},subdiagrempty/.style={star,star points=7,star point ratio=0.8,thick,draw=black,fill=black!20,minimum size=18pt,inner sep=3pt}}\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}[baseline={([yshift=-.5ex]
current bounding box.center)}]\node[empty] (A) at (-2,0) {$a$};
\node (B) at (0,0) {$j$,$t$};
\draw[prop] (A) -- (B);
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{
datavisualization,
datavisualization.formats.functions
}
\begin{document}
\tikz \datavisualization data group {function classes} = {
data [set=log, format=function] {
var x : interval [0.2:2.5];
func y = ln(\value x);
}
data [set=lin, format=function] {
var x : interval [-2:2.5];
func y = 0.5*\value x;
}
data [set=squared, format=function] {
var x : interval [-1.5:1.5];
func y = \value x*\value x;
}
data [set=exp, format=function] {
var x : interval [-2.5:1];
func y = exp(\value x);
}
};
\tikz \datavisualization [
scientific axes,
visualize as smooth line/.list={log, lin},
legend=south inside,
log= {label in legend={text=$\log x$}},
lin= {label in legend={text=$x/2$}},
style sheet=strong colors]
data group {function classes};
\end{document}
\documentclass[tikz,border=5pt]{standalone}

% Base packages
\usepackage{amsmath,amssymb}
\usepackage{xfp}  % for math calculations

% Color package
\usepackage[dvipsnames,svgnames]{xcolor}

% TikZ base settings
\usetikzlibrary{
calc,
patterns,
patterns.meta,
arrows.meta,
decorations.pathreplacing,
decorations.markings,
backgrounds,
shapes.geometric,
positioning,
intersections,
through,
angles,
quotes,
}

% tkz-base package
\usepackage{tkz-base}

% tkz-euclide package
\usepackage{tkz-euclide}

% Define colors not in xcolor
\providecolor{teal}{rgb}{0.0, 0.5, 0.5}
\providecolor{darkgray}{rgb}{0.4, 0.4, 0.4}
\providecolor{lightgray}{rgb}{0.8, 0.8, 0.8}

% tkz-euclide global settings
\tkzSetUpColors[background=white,text=black]
\tkzSetUpCompass[color=orange, line width=.2pt,delta=10]
\tkzSetUpArc[color=gray,line width=.2pt]
\tkzSetUpPoint[size=2,color=teal]
\tkzSetUpLine[line width=.2pt,color=teal]

% Custom styles
\tikzset{every picture/.style={line width=.2pt}}
\tikzset{new/.style={color=orange,line width=.2pt}}
\tikzset{label angle style/.append style={color=teal,font=\footnotesize}}
\tikzset{label style/.append style={below,color=teal,font=\scriptsize}}
\tikzset{line style/.style={line width=.2pt}}

% mybox style
\tikzset{
mybox/.style={
draw=gray,
fill=gray!10,
very thick,
rectangle,
rounded corners,
inner sep=10pt,
inner ysep=10pt
},
title/.style={
fill=gray,
text=white,
font=\bfseries,
right=10pt
}
}

% Define macros
\providecommand{\widearc}[1]{\overset{\frown}{#1}}
\providecommand{\rmark}{}
\providecommand{\parallelslant}{\mathbin{\!/\mkern-5mu/\!}}

\begin{document}
  \begin{tikzpicture}
    \tkzDefPoint(0,0){A}
    \tkzDefPoint(30:3){B}
    \tkzDefShiftPointCoord[B](10:2){C}
    \tkzDefShiftPointCoord[A](10:2){D}
    % Using comma-separated lists for broader compatibility and reliability
    \tkzDrawPolygon(A,B,C,D)
    \tkzDrawPoints(A,B,C,D)
  \end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=left,
axis line shift=10pt,
grid=major,
]
\addplot+ [samples=3] {x};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\foreach \x in {-1,0,1,2}{
\foreach \y in {-1,0,1,2}{
\def\clr{black}
\ifnum \x=0 \ifnum \y=0 \def\clr{red}
\else \fi \else \fi
\node[fill=\clr, circle, minimum size=0.4em, inner sep=0pt, outer sep=0pt] at (\x, \y){};
\ifnum \x=2 {} \else \ifnum \y=2 {} \else
\node[\clr] at (\x+0.5, \y+0.5) {$\circlearrowright$};
\fi \fi
}
}
\foreach \x in {-1,0,1,2}{
\foreach \y in {-1,0,1,2}{
\def\clr{black}
\ifnum \x=0 \ifnum \y=0 \def\clr{red}
\else \fi \else \fi
\ifnum \x=2
\draw (-1.3, \y) -- (-0.07, \y);
\draw (\x, \y) -- (\x+0.3, \y);
\else
\draw[\clr, decoration={markings, mark=at position 0.5 with {\arrow{>}}},
postaction={decorate}] (\x+0.07,\y) -- (\x+0.93,\y);
\fi
\ifnum \y=2
\draw (\x,-1.3) -- (\x, -0.07);
\draw (\x, \y+0.07) -- (\x, \y+0.3);
\else
\draw[\clr, decoration={markings, mark=at position 0.5 with {\arrow{>}}},
postaction={decorate}] (\x, \y+0.07) -- (\x, \y+0.93);
\fi
}
}
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[hide y axis,axis x line=middle,height=3cm,width=10cm,xmin=-22.5,xmax=83,samples=200,xtick={-20,0,20,40,60,80}]\addplot+[domain=-20:80,mark=none,green]{sin(40*.18*x)};
\draw[<->,green!70!black,thick](axis cs:40,0)--node[midway,above,font=\scriptsize]{$\varphi_1$}(axis cs:50,0);
\draw[<->,red!70!black,thick](axis cs:10,0)--(axis cs:20,0)node[midway,above,font=\scriptsize]{$\varphi_2$};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{set layers}
\begin{axis}[
scale only axis,
xmin=-5,xmax=5,
axis y line*=left,
xlabel=$x$,
ylabel=Absolute,
]
\addplot {x^2};
\end{axis}
\begin{axis}[
scale only axis,
xmin=-5,xmax=5,
ymin=0,ymax=1000,
yticklabel={
$\pgfmathprintnumber{\tick}$\textperthousand
},
axis y line*=right,
axis x line=none,
ylabel=per thousand,
]
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{graphs}
\tikzset{>=stealth}
\begin{document}
\tikz \graph {
{ a, b } ->
{ c [target edge style=red], d } ->
{ e, f },
b -> c
};
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
legend style={at={(0.4,-0.25)}, anchor=north,legend columns=-1},
ylabel={\#Annual Growth Percentage},
symbolic x coords={amod, advmod, ROOT, obj, nsubj},
xtick=data,
nodes near coords,
nodes near coords align={vertical}
]
\addplot coordinates {(amod, 68.0) (advmod, 67.0) (ROOT, 70.8) (obj, 66.2) (nsubj, 65.6)};
\addplot coordinates {(amod, 73.5) (advmod, 76.2 ) (ROOT, 75.5 ) (obj, 66.2 ) (nsubj, 76.1)};
\legend{QNLIdep , SNLI, Rice, Apple}
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[xscale=0.09,yscale=0.09,domain=0.125:220,samples=400]
\node[opacity=0.5] at (-4,-4) {$0$};
\draw[->] (-5,0) -- (70,0) node[below] {};
\draw[->] (0,-5) -- (0,50) node[left] {};
\foreach \i in {1,2,...,6} {
\draw[opacity=0.5] (\i*10,48) -- (\i*10,-2) node[below] {$\i$};
}
\foreach \i in {1,2,...,4} {
\draw[opacity=0.5] (68,\i*10) -- (-2,\i*10) node[left] {$\i$};
}
\draw[line width = 0.3mm, blue] (60,0) -- (20,40);
\draw[line width = 0.3mm, blue] (60,0) -- (0,20);
\draw[line width = 0.3mm, blue] (0,20) -- (20,40);
\node[opacity=0.5] at (68,-5.5) {{\large $x_1$}};
\node[opacity=0.5] at (-4.5,48) {{\large $x_3$}};
\draw[red] (0,20) node {$\bullet$};
\draw[red] (10,20) node {$\bullet$};
\draw[red] (60,0) node {$\bullet$};
\draw[red] (30,10) node {$\bullet$};
\draw[red] (40,10) node {$\bullet$};
\draw[red] (50,10) node {$\bullet$};
\draw[red] (20,20) node {$\bullet$};
\draw[red] (30,20) node {$\bullet$};
\draw[red] (40,20) node {$\bullet$};
\draw[red] (10,30) node {$\bullet$};
\draw[red] (20,30) node {$\bullet$};
\draw[red] (30,30) node {$\bullet$};
\draw[red] (20,40) node {$\bullet$};
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning, calc, fit}
\usepackage{lmodern}
\tikzset{every fit/.append style = text badly centered}
\tikzset{
default/.style = {draw, thick, align = center, shape = rectangle, minimum height = 10mm, minimum width = 20mm, text width = 15mm},
back1/.style = {draw = none, align = center, shape = rectangle, minimum height = 15mm, minimum width = 25mm, inner sep = 2mm},
back2/.style = {back1, draw, dashed, thick, minimum width = 30mm, inner sep = 4mm},
terminal/.style = {draw, thick, align = center, shape = circle, text width = 10mm},
}
\pgfmathsetmacro{\xnodedist}{2}
\pgfmathsetmacro{\ynodedist}{1.5}
\begin{document}
\begin{tikzpicture}
\node [default] (AAA) {AAA};
\node [default] (PPP) [right=\xnodedist of AAA] {NNN};
\node [default] (ZZZ) [right=\xnodedist of PPP] {ZZZ};
\node (FFF_label) [left=0.2*\xnodedist of AAA.west] {\rotatebox{90}{\textbf{FFF}}};
\draw [thick] (AAA) -- (PPP) -- (ZZZ);
\node [back1, fit=(AAA)(PPP)(ZZZ)(FFF_label)] (FFF) {};
\node [default] (QQQ1) [below=\ynodedist of $(AAA)!0.5!(PPP)$] {CCC};
\node [default] (QQQ2) [right=\xnodedist of QQQ1] {CCC};
\node (III_label) [below=\ynodedist of FFF_label.center] {\rotatebox{90}{\textbf{III}}};
\node [left=1em of QQQ1] (DOTS1) {\dots};
\node [right=1em of QQQ2] (DOTS2) {\dots};
\draw [thick] (QQQ1) -- (QQQ2);
\node [back1, fit= (DOTS1)(QQQ1)(QQQ2)(DOTS2)(III_label)] (DDD) {};
\node [back2, fit= (FFF)(DDD)] (HHH) {};
\node [terminal] (BB1) [below=1.5*\ynodedist of HHH.south west, xshift=0.5*\xnodedist*1cm] {BB};
\node [terminal] (BB2) [right=0.5*\xnodedist of BB1] {BB};
\draw[<->, thick] (BB1) -- (BB2);
\node [terminal] (BB4) [below=1.5*\ynodedist of HHH.south east, xshift=-0.5*\xnodedist*1cm] {BB};
\node [terminal] (BB3) [left=0.5*\xnodedist of BB4] {BB};
\node [back2, fit = (BB1) (BB2) ] (CCC) {};
\node [back2, fit = (BB3) (BB4) ] (DDD) {};
\draw[<->, thick] (BB3) to[out=90,in=180] ($(DDD.north |- HHH.south)+(0,0.3)$) to[out=0,in=90] (BB4);
\node [below] at (CCC.south) {\textbf{CCC Mode}};
\node [below] at (DDD.south) {\textbf{XXX Mode}};
\draw [<->, thick] (CCC.north) -- (CCC.north |- HHH.south) node [midway, left, align = center] {Assistance};
\end{tikzpicture}
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{graphs, graphs.standard}
\newcount\leftshorecount \newcount\rightshorecount
\newcount\mycount \newcount\myothercount
\def\zigzag{
\tikzgraphpreparecolor{left shore}\leftshorecount{left shore prefix}
\tikzgraphpreparecolor{right shore}\rightshorecount{right shore prefix}
\mycount=0\relax
\loop
\advance\mycount by 1\relax
\tikzgraphsset{new ->=
{\csname left shore prefix\the\mycount\endcsname}
{\csname right shore prefix\the\mycount\endcsname}{}{}}
\myothercount=\mycount\relax
\advance\myothercount by1\relax
\tikzgraphsset{new <-=
{\csname left shore prefix\the\myothercount\endcsname}
{\csname right shore prefix\the\mycount\endcsname}{}{}}
\ifnum\myothercount<\leftshorecount\relax
\repeat
}
\begin{document}
\newcount\leftshorecount \newcount\rightshorecount
\newcount\mycount \newcount\myothercount
\def\zigzag{
\tikzgraphpreparecolor{left shore}\leftshorecount{left shore prefix}
\tikzgraphpreparecolor{right shore}\rightshorecount{right shore prefix}
\mycount=0\relax
\loop
\advance\mycount by 1\relax
\tikzgraphsset{new ->=
{\csname left shore prefix\the\mycount\endcsname}
{\csname right shore prefix\the\mycount\endcsname}{}{}}
\myothercount=\mycount\relax
\advance\myothercount by1\relax
\tikzgraphsset{new <-=
{\csname left shore prefix\the\myothercount\endcsname}
{\csname right shore prefix\the\mycount\endcsname}{}{}}
\ifnum\myothercount<\leftshorecount\relax
\repeat
}
\begin{tikzpicture}
\graph [color class=left shore, color class=right shore]
{ [operator=\zigzag]
{ [left shore, Cartesian placement] a, b, c },
{ [right shore, Cartesian placement, nodes={xshift=1cm}] d, e, f }
};
\end{tikzpicture}
\end{document}
\documentclass[tikz,border=12pt]{standalone}
\tikzset{ruler from/.initial=0,ruler to/.initial=10,ruler steps/.initial=10,ruler ticks/.initial={9,3,3,3,3,6,3,3,3,3}
,ruler rotate/.initial=0,ruler/.is choice,ruler/in/.style={x=1in,ruler ticks={9,3,5,3,7,3,5,3},ruler steps=8}}\makeatletter\newcommand\Ruler[1][]{
\begin{tikzpicture}[line cap=rect,#1,rotate=\pgfkeysvalueof{/tikz/ruler rotate}]
\pgfmathtruncatemacro\ruler@steps{\pgfkeysvalueof{/tikz/ruler steps}}\pgfmathtruncatemacro\ruler@Start{floor((\pgfkeysvalueof{/tikz/ruler from})*\ruler@steps)}\pgfmathtruncatemacro\ruler@End{ceil((\pgfkeysvalueof{/tikz/ruler to})*\ruler@steps)}\draw(\ruler@Start/\ruler@steps,0)--(\ruler@End/\ruler@steps,0);
\foreach\ruler@Cnt[evaluate={\ruler@CntMod=int(Mod(\ruler@Cnt,\ruler@steps))},evaluate={\ruler@CntModLength=array({\pgfkeysvalueof{/tikz/ruler ticks}},\ruler@CntMod)}]in{\ruler@Start,...,\ruler@End}\draw(\ruler@Cnt/\ruler@steps,0)--++(up:\ruler@CntModLength pt)\ifnum\ruler@CntMod=0node[above,text depth=2pt,inner sep=0pt,rotate=\pgfkeysvalueof{/tikz/ruler rotate}]{$\pgfmathprint{int(\ruler@Cnt/\ruler@steps)}$}\fi;
\end{tikzpicture}}\makeatother
\begin{document}
\Ruler[ruler from=2.3,ruler to=3.9]\Ruler[ruler=in,ruler to=8]\Ruler[ruler rotate=30,ruler to=-5]
\end{document}
\documentclass[border=5pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{tikz}
\usetikzlibrary{
datavisualization,
datavisualization.formats.functions
}
\usepackage{amsmath,amssymb}
\begin{document}
\tikz \datavisualization data group {function classes} = {
data [set=log, format=function] {
var x : interval [0.2:2.5];
func y = ln(\value x);
}
data [set=lin, format=function] {
var x : interval [-2:2.5];
func y = 0.5*\value x;
}
data [set=squared, format=function] {
var x : interval [-1.5:1.5];
func y = \value x*\value x;
}
data [set=exp, format=function] {
var x : interval [-2.5:1];
func y = exp(\value x);
}
};
\tikz \datavisualization [
scientific axes,
every label in legend/.style={node style={fill=red!30}},
visualize as smooth line/.list={log, lin, squared, exp},
legend=north east outside,
log= {label in legend={text=$\log x$}},
lin= {label in legend={text=$x/2$, node style={circle, draw=red}}},
squared={label in legend={text=$x^2$}},
exp= {label in legend={text=$e^x$}},
style sheet=strong colors]
data group {function classes};
\end{document}
\documentclass[tikz,border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[node/.style={draw,rectangle},font=\small]
\node[node,label=above:{\small$0$}] (abbabaa) at (0,5) {$abbabaa$};
\node[node,label=right:{\small$0$}] (baabbaa) at (6,3.5) {$baabbaa$};
\node[node,label=right:{\small$0$}] (aabbaab) at (6,2.5) {$aabbaab$};
\node[node,label=below:{\small$0$}] (bbaabab) at (4,1) {$bbaabab$};
\node[node,label=below:{\small$0$}] (baababb) at (2,1) {$baababb$};
\node[node,label=below:{\small$0$}] (aababba) at (0,1) {$aababba$};
\node[node,label=left: {\small$0$}] (babbaba) at (0,3.6) {$babbaba$};
\node[node,label=left: {\small$0$}] (babbaab) at (-4,1.5) {$babbaab$};
\node[node,label=left: {\small$0$}] (abbaabb) at (-4,2.5) {$abbaabb$};
\node[node,label=above:{\small$1$}] (bbabaab) at (2,5) {$bbabaab$};
\node[node,label=above:{\small$1$}] (babaabb) at (4,5) {$babaabb$};
\node[node,label=right:{\small$1$}] (babaaba) at (2,3.6) {$babaaba$};
\node[node,label=right:{\small$1$}] (abaabba) at (6,4.5) {$abaabba$};
\node[node,label=right:{\small$1$}] (abbaaba) at (6,1.5) {$abbaaba$};
\node[node,label=right:{\small$1$}] (abaabab) at (2,2.3) {$abaabab$};
\node[node,label=left: {\small$1$}] (ababbab) at (0,2.3) {$ababbab$};
\node[node,label=below:{\small$1$}] (ababbaa) at (-2,1) {$ababbaa$};
\node[node,label=left: {\small$1$}] (bbaabba) at (-4,3.5) {$bbaabba$};
\node[node,label=left: {\small$1$}] (baabbab) at (-4,4.5) {$baabbab$};
\node[node,label=above:{\small$1$}] (aabbaba) at (-2,5) {$aabbaba$};
\draw[->,above] (abbabaa) edge node {$a$} (bbabaab);
\draw[->,above] (bbabaab) edge node {$b$} (babaabb);
\draw[->,right] (bbabaab) edge node {$b$} (babaaba);
\draw[->,above,bend left=15] (babaabb) edge node {$b$} (abaabba);
\draw[->,right] (abaabba) edge node {$a$} (baabbaa);
\draw[->,right] (baabbaa) edge node {$b$} (aabbaab);
\draw[->,right] (aabbaab) edge node {$a$} (abbaaba);
\draw[->,above,bend left=15] (abbaaba) edge node {$a$} (bbaabab);
\draw[->,above] (bbaabab) edge node {$b$} (baababb);
\draw[->,right] (babaaba) edge node {$b$} (abaabab);
\draw[->,right] (abaabab) edge node {$a$} (baababb);
\draw[->,above] (baababb) edge node {$b$} (aababba);
\draw[->,right] (aababba) edge node {$a$} (ababbab);
\draw[->,right] (ababbab) edge node {$a$} (babbaba);
\draw[->,right] (babbaba) edge node {$b$} (abbabaa);
\draw[->,above] (aababba) edge node {$a$} (ababbaa);
\draw[->,above,bend left=15] (ababbaa) edge node {$a$} (babbaab);
\draw[->,right] (babbaab) edge node {$b$} (abbaabb);
\draw[->,right] (abbaabb) edge node {$a$} (bbaabba);
\draw[->,right] (bbaabba) edge node {$b$} (baabbab);
\draw[->,above,bend left=15] (baabbab) edge node {$b$} (aabbaba);
\draw[->,above] (aabbaba) edge node {$a$} (abbabaa);
\end{tikzpicture}
\end{document}