[pstricks] PSTricks Digest, Vol 119, Issue 7

Cyrille Piatecki cyrille.piatecki at univ-orleans.fr
Thu Dec 13 14:57:56 CET 2012


Le 13/12/2012 12:00, pstricks-request at tug.org a écrit :
> \documentclass{article}
> \usepackage{pst-fit}
> \begin{filecontents}{linear.dat}
> 1 4
> 2 6
> 3 8
> 4 10
> 5 12
> 6 14
> 7 16
> 8 18
> 9 20
> 10 22
> \end{filecontents}
>
> \begin{document}
>
> \psset{xAxisLabel=x, %Setup for psgraph env
>           yAxisLabel=y,
>           xAxisLabelPos=,
>           yAxisLabelPos=,
>           lly=-1cm,llx=-1cm}
> \readdata{\Linear}{linear.dat}
> \begin{psgraph}[arrows=->,Dy=2](0,0)(0,0)(10,22){4.5in}{4.5in}
> \listplot[decimals=2,EqPos=3 2,plotstyle=GLLSR,linestyle=dashed]{\Linear}
> \listplot[plotstyle=dots,linecolor=red,dotscale=2,dotstyle=x]{\Linear}
> \end{psgraph}
>
> \end{document}
Here is what I mean

%
\documentclass{article}
\usepackage{pst-fit}
\begin{filecontents}{linear.dat}
1 4
2 6
3 8
4 10
5 12
6 14
7 16
8 18
9 20
10 22
\end{filecontents}

\begin{document}

\psset{xAxisLabel=x, %Setup for psgraph env
          yAxisLabel=y,
          xAxisLabelPos=,
          yAxisLabelPos=,
          lly=-1cm,llx=-1cm}
\readdata{\Linear}{linear.dat}
\begin{psgraph}[arrows=->,Dy=2](0,0)(0,0)(10,22){4.5in}{4.5in}
\listplot[decimals=2,EqPos=3 2,plotstyle=GLLSR,linestyle=dashed]{\Linear}
\listplot[plotstyle=dots,linecolor=red,dotscale=2,dotstyle=x]{\Linear}
\rput(6,6){$\begin{array}{c}
y = 2 +\ 2\, \, x\\
\hspace{.35cm}(a)\hspace{.25cm}(a)\\
R^2 = 1

\end{array}$}

\end{psgraph}
\noindent where $a$ is either the p value --- significance level~---, 
the standard error or the student $t$
\end{document}


More information about the PSTricks mailing list