# [pstricks] problem with def and dataplot

cyrille piatecki cyrille.piatecki at univ-orleans.fr
Sat Mar 28 08:12:36 CET 2015

In the following exemple

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{center}
\begin{pspicture}(0,0)(14,6)
\psgrid
\def\gu{
\psline{<->}(3,5)(3,2)(10,2)
\rput(10.2,2){\tiny$n$}
\rput(2.8,5){\tiny$\mathcal{H}$}
\rput(2.6,4.35){\tiny$0.840$}
\rput(9.5,3.35){\tiny$0.779$}
\rput(7.,4.05){\tiny$0.704$}
\rput(5.,4.3){\tiny$0.589$}
\rput(2.6,3.1){\tiny$0.529$}
\rput(5,3.3){\tiny$0.523$}
\rput(7,3.1){\tiny$0.582$}
\rput(9.5,4.3){\tiny$0.833$}
\rput(4,4.5){\tiny Greedy}
\rput(4,2.785){\tiny Simulation}
\savedata{\hellcl}[
{{1, 0.840},
{2, 0.779},
{3, 0.704},
{4, 0.598}}]
\savedata{\hellcs}[
{{1, 0.529},
{2, 0.523},
{3, 0.582},
{4, 0.833}}]
% 1\ = 10, 2 = 50, 3 = 100, 4 = 1000
\dataplot[origin={1,1}, xunit=2cm,
yunit=4cm,showpoints=true,linecolor=red]{\hellcl}
\dataplot[origin={1,1}, xunit=2cm,
yunit=4cm,linecolor=blue,showpoints=true]{\hellcs}
}
\rput(0,0){\psscalebox{.8 .8}{\gu}}

\end{pspicture}
\end{center}
\end{figure}
\end{document}

the plot is not done. But without the defininition and the scalebox it works

Thanks

Cyrille Piatecki