Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tikzset{vertex style/.style={
- draw=#1,
- thick,
- fill=#1!70,
- text=white,
- ellipse,
- minimum width=2cm,
- minimum height=0.75cm,
- font=small,
- outer sep=3pt, % the usage of this option will be clear later on
- },
- }
- usetikzlibrary{shapes.geometric}
- documentclass[dvipsnames,png,border=10pt,tikz]{standalone}
- usepackage{tikz}
- usetikzlibrary{shapes.geometric} % required for the ellipse shape
- tikzset{vertex style/.style={
- draw=#1,
- thick,
- fill=#1!70,
- text=white,
- ellipse,
- minimum width=2cm,
- minimum height=0.75cm,
- font=small,
- outer sep=3pt,
- },
- }
- begin{document}
- begin{tikzpicture}
- node[vertex style=Turquoise] (Rk) {Righteous Kill};
- end{tikzpicture}
- end{document}
- node[options] (a) {text a} ... edge[options] node[options]{text conn} (b);
- begin{tikzpicture}[node distance=2.75cm,>=stealth']
- node[vertex style=Turquoise] (Rk) {Righteous Kill};
- node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
- edge [<-,cyan!60!blue] node[text style,above]{starring} (Rk);
- end{tikzpicture}
- tikzset{
- text style/.style={
- sloped, % the text will be parallel to the connection
- text=black,
- font=footnotesize,
- above
- }
- }
- begin{tikzpicture}[node distance=2.75cm,>=stealth']
- node[vertex style=Turquoise] (Rk) {Righteous Kill};
- node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
- edge [<-,cyan!60!blue] node[text style]{starring} (Rk);
- node[vertex style=BurntOrange, right=1.5cm of Rk,yshift=4ex] (AP) {Al Pacino}
- edge [<-,cyan!60!blue] node[text style]{starring} (Rk);
- node[vertex style=red, below right of=Rk,xshift=2em] (JA) {John Avnet}
- edge [<-,cyan!60!blue] node[text style]{director} (Rk);
- node[vertex style=BurntOrange, right=1.5cm of Rk,yshift=-4ex] (RN) {Robert De Niro}
- edge [<-,cyan!60!blue] node[text style]{starring} (Rk);
- node[vertex style=MidnightBlue, above right of=Rk,xshift=2em] (Dr) {Drama}
- edge [<-,cyan!60!blue] node[text style]{genre} (Rk);
- node[vertex style=Maroon, below of=Rk,xshift=-2em] (Skf) {Serial Killer Films}
- edge [<-,cyan!60!blue] node[text style]{subject} (Rk);
- node[vertex style=Maroon, below right of=Skf] (Cf) {Crime Films}
- edge [<-,cyan!60!blue] node[text style]{broader} (Skf);
- end{tikzpicture}
- begin{pgfonlayer}{background}
- draw[Maroon,fill=Maroon,dashed,fill opacity=0.1](Rk.north)
- to[closed,curve through={(Rk.north west).. (Rk.west) .. (Rk.south west)
- ..($(Rk.south west)!0.5!(Skf.north)$) .. (Skf.north west).. (Skf.west)
- .. (Skf.south west) .. ($(Skf.south)!0.75!(Cf.west)$) .. (Cf.west)
- .. (Cf.south west) .. (Cf.south) .. (Cf.south east) .. (Cf.east)
- .. ($(Cf.north east)!0.65!(Skf.south east)$) .. (Skf.east)
- .. (Skf.north east).. ($(Skf.north)!0.35!(Rk.south east)$)
- .. (Rk.south east) .. (Rk.east)..(Rk.north east)}](Rk.north);
- end{pgfonlayer}
- documentclass[dvipsnames,png,border=10pt,tikz]{standalone}
- usepackage{tikz}
- usetikzlibrary{shapes.geometric} % required for the ellipse shape
- usetikzlibrary{arrows, backgrounds, calc, hobby, positioning}
- % this avoides some problem with the hobby implementation
- % egreg's code from:
- % http://www.guitex.org/home/it/forum/5-tex-e-latex/83195-la-libreria-hobby-tikz-non-funziona-piu#83203
- ExplSyntaxOn
- cs_if_exist:NF prg_stepwise_function:nnnN { cs_gset_eq:NN prg_stepwise_function:nnnN int_step_function:nnnN }
- cs_if_exist:NF prg_stepwise_inline:nnnn { cs_gset_eq:NN prg_stepwise_inline:nnnn int_step_inline:nnnn }
- ExplSyntaxOff
- tikzset{vertex style/.style={
- draw=#1,
- thick,
- fill=#1!70,
- text=white,
- ellipse,
- minimum width=2cm,
- minimum height=0.75cm,
- font=small,
- outer sep=3pt,
- },
- text style/.style={
- sloped,
- text=black,
- font=footnotesize,
- above
- }
- }
- begin{document}
- begin{tikzpicture}[node distance=2.75cm,>=stealth']
- node[vertex style=Turquoise] (Rk) {Righteous Kill};
- node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
- edge [<-,cyan!60!blue] node[text style]{starring} (Rk);
- node[vertex style=BurntOrange, right=1.5cm of Rk,yshift=4ex] (AP) {Al Pacino}
- edge [<-,cyan!60!blue] node[text style]{starring} (Rk);
- node[vertex style=red, below right of=Rk,xshift=2em] (JA) {John Avnet}
- edge [<-,cyan!60!blue] node[text style]{director} (Rk);
- node[vertex style=BurntOrange, right=1.5cm of Rk,yshift=-4ex] (RN) {Robert De Niro}
- edge [<-,cyan!60!blue] node[text style]{starring} (Rk);
- node[vertex style=MidnightBlue, above right of=Rk,xshift=2em] (Dr) {Drama}
- edge [<-,cyan!60!blue] node[text style]{genre} (Rk);
- node[vertex style=Maroon, below of=Rk,xshift=-2em] (Skf) {Serial Killer Films}
- edge [<-,cyan!60!blue] node[text style]{subject} (Rk);
- node[vertex style=Maroon, below right of=Skf] (Cf) {Crime Films}
- edge [<-,cyan!60!blue] node[text style]{broader} (Skf);
- begin{pgfonlayer}{background}
- draw[Maroon,fill=Maroon,dashed,fill opacity=0.1](Rk.north)
- to[closed,curve through={(Rk.north west).. (Rk.west) .. (Rk.south west)
- ..($(Rk.south west)!0.5!(Skf.north)$) .. (Skf.north west).. (Skf.west)
- .. (Skf.south west) .. ($(Skf.south)!0.75!(Cf.west)$) .. (Cf.west)
- .. (Cf.south west) .. (Cf.south) .. (Cf.south east) .. (Cf.east)
- .. ($(Cf.north east)!0.65!(Skf.south east)$) .. (Skf.east)
- .. (Skf.north east).. ($(Skf.north)!0.35!(Rk.south east)$)
- .. (Rk.south east) .. (Rk.east)..(Rk.north east)}](Rk.north);
- end{pgfonlayer}
- end{tikzpicture}
- end{document}
- begin{tikzpicture}[node distance=2.75cm,>=stealth']
- node[vertex style=Turquoise] (Rk) {Righteous Kill};
- node[vertex style=BurntOrange, above of=Rk,xshift=2em] (BD) {Bryan Dennehy}
- edge [<-,cyan!60!blue] node[text style,above]{starring} (Rk);
- end{tikzpicture}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement