Skip to content

Commit

Permalink
Split figures relying on pgfplot 1.12 commands to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed May 4, 2015
1 parent 9e4ab49 commit e24aaa7
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 141 deletions.
64 changes: 64 additions & 0 deletions paper/figures-ng.tex
@@ -0,0 +1,64 @@
\documentclass[a4paper,english]{report}

\include{rendering-preamble}

\usepackage[pfx=figures-ng-]{jpfigurengcommands}
\include{tableread}

\begin{document}



\tikzsetnextfilename{mini-2x1-categories-scatter}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=2 by 1,
horizontal sep=8pt,
vertical sep=16pt,
},
]

\nextgroupplot[
% title=C1 Sweden,
xlabel=http-www,
ylabel=https-www,
allDatasetsScatter,
allDatasetsScatterMiniResults,
scatter/classes={
Any={mark=square*,blue},%
Disconnect={mark=triangle*,red},%
Content={mark=x,draw=black},%
Advertising={mark=o,draw=red},%
Analytics={mark=diamond,draw=blue},%
Social={mark=+,draw=green}%
},%
]
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpHttpsWww

\legend{}

\nextgroupplot[
% title=C2 Global,
xlabel=http-www,
% ylabel=https-www,
allDatasetsScatter,
allDatasetsScatterMiniResults,
scatter/classes={
Any={mark=square*,blue},%
Disconnect={mark=triangle*,red},%
Content={mark=x,draw=black},%
Advertising={mark=o,draw=red},%
Analytics={mark=diamond,draw=blue},%
Social={mark=+,draw=green}%
},%
yticklabels={},
]
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpHttpsWww

\end{groupplot}
\end{tikzpicture}



\end{document}
52 changes: 0 additions & 52 deletions paper/figures.tex
Expand Up @@ -833,58 +833,6 @@



\tikzsetnextfilename{mini-2x1-categories-scatter}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=2 by 1,
horizontal sep=8pt,
vertical sep=16pt,
},
]

\nextgroupplot[
% title=C1 Sweden,
xlabel=http-www,
ylabel=https-www,
allDatasetsScatter,
allDatasetsScatterMiniResults,
scatter/classes={
Any={mark=square*,blue},%
Disconnect={mark=triangle*,red},%
Content={mark=x,draw=black},%
Advertising={mark=o,draw=red},%
Analytics={mark=diamond,draw=blue},%
Social={mark=+,draw=green}%
},%
]
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpHttpsWww

\legend{}

\nextgroupplot[
% title=C2 Global,
xlabel=http-www,
% ylabel=https-www,
allDatasetsScatter,
allDatasetsScatterMiniResults,
scatter/classes={
Any={mark=square*,blue},%
Disconnect={mark=triangle*,red},%
Content={mark=x,draw=black},%
Advertising={mark=o,draw=red},%
Analytics={mark=diamond,draw=blue},%
Social={mark=+,draw=green}%
},%
yticklabels={},
]
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpHttpsWww

\end{groupplot}
\end{tikzpicture}



\tikzsetnextfilename{mini-1x1-internal-resources-cdf}
\begin{tikzpicture}
\begin{axis}[
Expand Down
90 changes: 1 addition & 89 deletions paper/jpfigurecommands.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jpfigurecommands}[2015/04/27 v0.1 Joel Purra, figure commands]
\ProvidesPackage{jpfigurecommands}[2015/05/04 v0.2.0 Joel Purra, figure commands]

\RequirePackage{pgfplotstable}

Expand All @@ -14,8 +14,6 @@



\pgfplotsset{compat=1.12}

% Speed up pgfplots/tikz figure generation by caching results.
% LyX needs to be configured per user;
% In LyX Preferences, File Handling, Converters:
Expand Down Expand Up @@ -364,92 +362,6 @@ title style={at={(.5,.95)}},



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pgfplotsset{
allDatasetsScatter/.style=
{
scatter,
only marks,
point meta=explicit symbolic,
fill opacity=0.9,
ymin=0,
ymax=1,
ytick={0,.2,.4,.6,.8,1},
minor ytick={.1,.3,.5,.7,.9},
yminorgrids=true,
ymajorgrids=true,
xtick={0,.2,.4,.6,.8,1},
minor xtick={.1,.3,.5,.7,.9},
xminorgrids=true,
xmajorgrids=true,
},
allDatasetsScatterFullPage/.style=
{
width=1.47\textwidth,
height=.65\textwidth,
font=\small,
legend columns=1,
legend style={at={(1.05,0.5)},anchor=west,cells={anchor=west},}
},
allDatasetsScatterMiniResults/.style=
{
enlarge y limits={abs=8pt},
enlarge x limits={abs=8pt},
width=.35\textwidth,
height=.35\textwidth,
font=\tiny,
legend columns=1,
legend style={at={(1.05,0.5)},anchor=west,cells={anchor=west},},
yticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill=false,
/pgf/number format/precision=1
},
title style={at={(.5,.95)}},
xticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,
/pgf/number format/precision=1
},
yticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,
/pgf/number format/precision=1
},
},
}

\newcommand{\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww}[3]{
\scatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{#1}{\newScatterTable}{#2}{#3}

\addplot+[]
table[x=http-www,y=https-www,label=Category]
\newScatterTable;

\addlegendentry{#1}
}

\newcommand{\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww}[2]{
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Any}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Disconnect}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Content}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Advertising}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Analytics}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Social}{#1}{#2}
}

\newcommand{\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpHttpsWww}[0]{
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpWww}{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpsWww}
}

\newcommand{\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpHttpsWww}[0]{
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpWww}{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpsWww}
}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Expand Down
116 changes: 116 additions & 0 deletions paper/jpfigurengcommands.sty
@@ -0,0 +1,116 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jpfigurengcommands}[2015/05/04 v0.1 Joel Purra, figure next generation commands]

\RequirePackage{pgfplotstable}

\RequirePackage{kvoptions}
\SetupKeyvalOptions{%
family=JPFCNG,
prefix=JPFCNG@,
}

\DeclareStringOption{pfx}
\ProcessKeyvalOptions*

\PassOptionsToPackage{pfx=\JPFCNG@pfx}{jpfigurecommands}
\RequirePackage{jpfigurecommands}



\pgfplotsset{compat=1.12}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\pgfplotsset{
allDatasetsScatter/.style=
{
scatter,
only marks,
point meta=explicit symbolic,
fill opacity=0.9,
ymin=0,
ymax=1,
ytick={0,.2,.4,.6,.8,1},
minor ytick={.1,.3,.5,.7,.9},
yminorgrids=true,
ymajorgrids=true,
xtick={0,.2,.4,.6,.8,1},
minor xtick={.1,.3,.5,.7,.9},
xminorgrids=true,
xmajorgrids=true,
},
allDatasetsScatterFullPage/.style=
{
width=1.47\textwidth,
height=.65\textwidth,
font=\small,
legend columns=1,
legend style={at={(1.05,0.5)},anchor=west,cells={anchor=west},}
},
allDatasetsScatterMiniResults/.style=
{
enlarge y limits={abs=8pt},
enlarge x limits={abs=8pt},
width=.35\textwidth,
height=.35\textwidth,
font=\tiny,
legend columns=1,
legend style={at={(1.05,0.5)},anchor=west,cells={anchor=west},},
yticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill=false,
/pgf/number format/precision=1
},
title style={at={(.5,.95)}},
xticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,
/pgf/number format/precision=1
},
yticklabel style={
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,
/pgf/number format/precision=1
},
},
}

\newcommand{\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww}[3]{
\scatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{#1}{\newScatterTable}{#2}{#3}

\addplot+[]
table[x=http-www,y=https-www,label=Category]
\newScatterTable;

\addlegendentry{#1}
}

\newcommand{\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww}[2]{
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Any}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Disconnect}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Content}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Advertising}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Analytics}{#1}{#2}
\addScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{Social}{#1}{#2}
}

\newcommand{\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpHttpsWww}[0]{
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpWww}{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedSwedenHttpsWww}
}

\newcommand{\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpHttpsWww}[0]{
\addDefaultScatterTableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedHttpHttpsWww{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpWww}{\tableDatasetsNonFailedDisconnectCategoriesCoverageExternalSortedGlobalHttpsWww}
}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\endinput

0 comments on commit e24aaa7

Please sign in to comment.