Skip to content

Instantly share code, notes, and snippets.

@oerpli
Last active June 15, 2017 11:47
Show Gist options
  • Save oerpli/3e68cb1e30ec0847afcaa9a49a825ade to your computer and use it in GitHub Desktop.
Save oerpli/3e68cb1e30ec0847afcaa9a49a825ade to your computer and use it in GitHub Desktop.
\documentclass{standalone}
\usepackage[usenames,dvipsnames,table]{xcolor} % Allows the definition and use of colors. This package has to be included before tikz.
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{float}
\usepackage{lmodern} % Use an extension of the original Computer Modern font to minimize the use of bitmapped letters.
\usepackage[T1]{fontenc} % Determines font encoding of the output. Font packages have to be included before this line.
\usepackage[utf8]{inputenc} % Determines encoding of the input. All input files have to use UTF8 encoding.
\usepackage{graphicx}
\usepackage{amsmath} % Extended typesetting of mathematical expression.
\usepackage{amssymb} % Provides a multitude of mathematical symbols.
%: Use colormap for custom charts:
\usepgfplotslibrary{colormaps}
\usetikzlibrary{calc}
\pgfplotsset{colormap name=viridis}%
\tikzset{
ellEV/.style={
% pgfplots/colormap name=viridis,
color of colormap={300 + #1*1400}, % offset * 2 + scale <= 2000
draw=.!80!black,
fill=.!80!white,
text = black
},
}
\begin{document}
\begin{tikzpicture}[scale=1.5]
\coordinate (C1) at (2,2);
\foreach \a in {1,...,6}{
\node[] at ($(C1)+(360/7*\a:1.3)$) {\scriptsize 0.13\ \ };
\draw[thick](C1) -- ($(C1)+(360/7*\a:1)$);
\draw[ellEV=0.13] ($(C1)+(360/7*\a:1)$) circle(0.12);
}
\coordinate (M) at ($(C1)+(8+360/7*7:1.3)$);
\draw[thick](C1) -- (M);
\draw[ellEV=0.39] (C1) circle(0.12) node[left] {\scriptsize 0.39\ \ }; % center 1 finished
\coordinate (C1) at (4.6,2); % create new center to the right
\draw[thick](C1) -- (M); % connect middle with new center
\draw[ellEV=0.31] (M) circle(0.12) node[above=5pt]{\scriptsize 0.31};
\foreach \a in {1,2,4}{
\node[] at ($(C1)+(360/6*\a:1.3)$) {\scriptsize 0.17};
\draw[thick](C1) -- ($(C1)+(360/6*\a:1)$);
\draw[ellEV=0.17] ($(C1)+(360/6*\a:1)$) circle(0.12);
}
\coordinate (R1) at ($(C1)+(20:1.3)$);
\coordinate (RM) at ($(C1)+(-20:1.3)$);
\coordinate (R2) at ($(C1)+(360/6*5:1)$);
\node[] at ($(C1)+(360/6*5:1.4)$) {\scriptsize 0.25}; % R2 node
\draw[thick](C1) -- (R1);
\draw[thick](C1) -- (R2);
\draw[thick](RM) -- (R1);
\draw[thick](RM) -- (R2);
\draw[ellEV=0.5] (C1) circle(0.12) node[below right] {\scriptsize\ 0.50};
\draw[ellEV=0.21] (RM) circle(0.12) node[below right] {\scriptsize 0.21};
\coordinate (RR1) at ($(R1)+(20:1.3)$);
\coordinate (RR2) at ($(R1)+(-10:1.5)$);
\coordinate (RR3) at ($(R1)+(-40:1.3)$);
\draw[thick](R1) -- (RR1);
\draw[thick](R1) -- (RR3);
\draw[thick](RR1) -- (RR2);
\draw[thick](RR2) -- (RR3);
\draw[ellEV=0.16] (RR1) circle(0.12) node[above=5pt] {\scriptsize 0.16};
\draw[ellEV=0.11] (RR2) circle(0.12) node[right=3pt] {\scriptsize 0.11};
\draw[ellEV=0.16] (RR3) circle(0.12) node[right=3pt] {\scriptsize 0.16};
\draw[ellEV=0.36] (R1) circle(0.12) node[above=5pt]{\scriptsize 0.36\ \ };
\draw[ellEV=0.12] (R2) circle(0.12);
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\usepackage[usenames,dvipsnames,table]{xcolor} % Allows the definition and use of colors. This package has to be included before tikz.
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{float}
\usepackage{lmodern} % Use an extension of the original Computer Modern font to minimize the use of bitmapped letters.
\usepackage[T1]{fontenc} % Determines font encoding of the output. Font packages have to be included before this line.
\usepackage[utf8]{inputenc} % Determines encoding of the input. All input files have to use UTF8 encoding.
\usepackage{graphicx}
\usepackage{amsmath} % Extended typesetting of mathematical expression.
\usepackage{amssymb} % Provides a multitude of mathematical symbols.
%: Use colormap for custom charts:
\usepgfplotslibrary{colormaps}
\usetikzlibrary{calc}
\pgfplotsset{colormap name=viridis}%
\tikzset{
ellEV/.style={
% pgfplots/colormap name=viridis,
color of colormap={300 + #1*1400}, % offset * 2 + scale <= 2000
draw=.!80!black,
fill=.!80!white,
text = black
},
}
\begin{document}
%\fbox{
\begin{tikzpicture}[scale=2.5]
\coordinate (C1) at (2,2);
\foreach \a in {1,...,6}{
\draw[thick](C1) -- ($(C1)+(360/7*\a:1)$);
\node[circle,ellEV=0.13] at ($(C1)+(360/7*\a:1)$) {0.12};
}
\coordinate (M) at ($(C1)+(8+360/7*7:1.3)$);
\draw[thick](C1) -- (M);
\node[circle,ellEV=0.39]at (C1) {0.39}; % center 1 finished
\coordinate (C1) at (4.6,2); % create new center to the right
\draw[thick](C1) -- (M); % connect middle with new center
\node[circle,ellEV=0.31]at (M) {0.31} ;
\foreach \a in {1,2,4}{
\draw[thick](C1) -- ($(C1)+(360/6*\a:1)$);
\node[circle,ellEV=0.17] at ($(C1)+(360/6*\a:1)$) {0.12};
}
\coordinate (R1) at ($(C1)+(20:1.3)$);
\coordinate (RM) at ($(C1)+(-20:1.3)$);
\coordinate (R2) at ($(C1)+(360/6*5:1)$);
\draw[thick](C1) -- (R1);
\draw[thick](C1) -- (R2);
\draw[thick](RM) -- (R1);
\draw[thick](RM) -- (R2);
\node[circle,ellEV=0.50]at (C1) {0.50};
\node[circle,ellEV=0.21]at (RM) {0.21};
\coordinate (RR1) at ($(R1)+(20:1.3)$);
\coordinate (RR2) at ($(R1)+(-10:1.5)$);
\coordinate (RR3) at ($(R1)+(-40:1.3)$);
\draw[thick](R1) -- (RR1);
\draw[thick](R1) -- (RR3);
\draw[thick](RR1) -- (RR2);
\draw[thick](RR2) -- (RR3);
\node[circle,ellEV=0.16]at (RR1) {0.16};
\node[circle,ellEV=0.11] at (RR2) {0.11};
\node[circle,ellEV=0.16] at (RR3) {0.16};
\node[circle,ellEV=0.36]at (R1) {0.36};
\node[circle,ellEV=0.25] at (R2) {0.25};
\end{tikzpicture}
%}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment