# Problem with pstricks captioning, packages etc

I'm new by pstricks and trying to make my plots with it, but I am facing some problems.

1. I cannot place my plots wherever I want to in the page as I did for pict2e. How can I fix the plots where I want them to be?

2. I don't know which packages are used for each plot. For example, which package should I use when I'm plotting axes and using \psaxes and such examples? Where can I find a good reference for that?

3. How can I make a caption for my plots? The way I used to make captions in pict2e is not that much useful here. For instance the code which is below : ‎

\documentclass{book}‎
\usepackage{pstricks}‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

\begin{document}‎

‎\begin{figure}‎
\begin{center}‎‎
‎\psline[linewidth=‎1‎pt , ‎linecolor=red‎‎]{<-‎‎}(-1,1)‎‎
\psset{linecolor=green}‎‎‎‎
‎\psline[linewidth=3pt]{>->}(2,-3)‎
‎‎\psline[linewidth=‎1‎pt , ‎linecolor=yellow‎‎]{-‎‎>}(‎0‎,1)‎‎
‎\psline[‎linecolor=orange , ‎linewidth=‎1‎pt]{-‎‎>}(1,‎0‎)‎‎
‎‎‎‎‎\psline‎‎‎[‎‎‎‎‎linewidth=‎2‎pt ,‎ ‎linecolor‎=magenta ‎‎]‎‎‎‎{-‎‎>}(1,‎4‎‎‎‎)‎‎
‎‎\psline[linecolor=‎magenta‎,linestyle=dotted](‎‎2,‎3‎)‎‎‎‎‎‎‎‎‎‎‎‎‎‎
{\psset{linecolor=green,linestyle=dotted}\psline(‎2‎,4)}‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎
‎‎\caption{‎first arrows‎‎} ‎‎
\end{center}‎‎
‎\end{figure}‎‎

‎\end{document}‎


-
Please remove all that unnecessary white space from your picture. –  Caramdir Sep 24 '11 at 20:32
I would if I knew how can I do it –  Negin Sep 24 '11 at 20:47
There are lots of tools for that. If you are on Windows there is for example MS Paint. –  Caramdir Sep 24 '11 at 21:15
oh , I see , I thought that you mean by LATEX , I'll do that for my next posts . –  Negin Sep 24 '11 at 21:23

There is tons of documentation on your system! Run texdoc pst-plot and you'll get the one from package pst-plot, or visit http://PSTricks.tug.org

You do not need the figure environment if you want to place the image at a particular place in your doc:

\documentclass{book}
\usepackage{pstricks}
\usepackage{caption}
\begin{document}

\begin{center}
\begin{pspicture}(-1,-3)(2,4)
\psline[linewidth=1pt,linecolor=red]{<-}(-1,1)
\psset{linecolor=green}
\psline[linewidth=3pt]{>->}(2,-3)
\psline[linewidth=1pt,linecolor=yellow]{->}(0,1)
\psline[linecolor=orange,linewidth=1pt]{->}(1,0)
\psline[linewidth=2pt,linecolor=magenta]{->}(1,4)
\psline[linecolor=magenta,linestyle=dotted](2,3)
\psset{linecolor=green,linestyle=dotted}
\psline(2,4)
\end{pspicture}
\captionof{figure}{first arrows}
\end{center}

\end{document}

-
The tutorials from TUG India at PSTricks site mentioned above are an excellent way to start learning. –  DJP Sep 24 '11 at 20:45
Thank you very much Herbert , it was really helpful –  Negin Sep 24 '11 at 21:35