If two armies arriving on the same day, which one is attacking/defending?
In the .log
file you will find the warnings
LaTeX Warning: Label `Fig3Legend' multiply defined.
LaTeX Warning: Label `Fig3Legend' multiply defined.
What this means is that the Fig3Legend
label is applied to all three groupplots
, and therefore the \ref
will point to only the last of these, the last groupplot
. As that only has six plots, you get six entries in the legend. One workaround is shown below. I first define eight styles for the plots (for convenience, this isn't strictly necessary), and in the last groupplot
I add two \addlegendimage
, which is used to add additional entries in the legend.
Note that I also altered the style of +Resources
and ++Resources
slightly, so there less chance of confusion. You had three lines with the same style.
\documentclass[border=2mm]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}
\pgfplotsset{compat = 1.12}
\begin{document}
\begin{tikzpicture}[
HA/.style={black, mark=o,line join=round, mark repeat=50},
CAG/.style={black, mark=x,line join=round, mark repeat=50},
Rnd/.style={black, mark=|,line join=round, mark repeat=50},
P/.style={black, densely dashed, mark=square,line join=round, mark repeat=50},
PP/.style={black, thick, mark=square,line join=round, mark repeat=50},
PPPT/.style={black, mark=triangle,line join=round, mark repeat=50},
PPSM/.style={black, mark=square,line join=round, mark repeat=50},
PPBM/.style={black, mark=asterisk,line join=round, mark repeat=50}]
\begin{groupplot}[
legend columns=4,
legend style={nodes={font=\tiny}},
legend entries={Hold All,Come and Go,Random,+Resources,++Resources,++ResourcesPT,++ResourcesSM,++ResourcesBM},
legend to name=Fig3Legend,
group style={
group name = fig3_plots,
group size=3 by 1,
xlabels at=edge bottom,
ylabels at=edge left
},
width=\textwidth,
legend style={draw=none},
xlabel = {\footnotesize $\alpha$},
ylabel = {\footnotesize Avg Portfolio Value},
]
\nextgroupplot[title={\scriptsize +Resources},
y tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
footnotesize,
x tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
ymin=0,
xtick={1000,2000,3000,4000}]
\addplot+[HA] table[col sep=comma, y=HoldAll, x=Alpha]{ElicitedFixedAlpha.csv};
\addplot+[CAG] table[col sep=comma, y=ComeAndGo, x=Alpha]{ElicitedFixedAlpha.csv};
\addplot+[Rnd] table[col sep=comma, y=Random, x=Alpha]{ElicitedFixedAlpha.csv};
\addplot+[P] table[col sep=comma, y=Plus, x=Alpha]{ElicitedFixedAlpha.csv};
\nextgroupplot[title={\scriptsize ++Resources (Empirical CDF)},
y tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
footnotesize,
x tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
ymin=0]
\addplot+[HA] table[col sep=comma, y=HoldAll, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[CAG] table[col sep=comma, y=ComeAndGo, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[Rnd] table[col sep=comma, y=Random, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[PP] table[col sep=comma, y=PlusPlus, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\nextgroupplot[title={\scriptsize ++Resources (Elicited CDFs)},
y tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
footnotesize,
x tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
ymin=0]
\addplot+[HA] table[col sep=comma, y=HoldAll, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[CAG] table[col sep=comma, y=ComeAndGo, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[Rnd] table[col sep=comma, y=Random, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addlegendimage{P}
\addlegendimage{PP}
\addplot+[PPPT] table[col sep=comma, y=PlusPlusPT, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[PPSM] table[col sep=comma, y=PlusPlusSM, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\addplot+[PPBM] table[col sep=comma, y=PlusPlusBM, x=Alpha]{ElicitedFixedAlphaPlusPlus.csv};
\end{groupplot}
\node (fig3_Legend) at ($(fig3_plots c2r1.center)-(0,2.5cm)$){\ref{Fig3Legend}};
\end{tikzpicture}
\end{document}
Yes. You can use the pathauto module.
http://dgo.to/pathauto
With help from @AndreJ, the key was to change to the correct EPSG code:
import pyproj
p = pyproj.Proj(init='EPSG:28991')
lon, lat = p(124616.1535508, 486555.4631204, inverse=True)
print(lat, lon)
EDIT: To find the right EPSG code go to http://spatialreference.org/ and type in your location. Then try each one, for me it was the last one.