I draw a graph in Latex but I'm having a problem in placing the caption of the graph since I want it be exactly below my graph at the left side of the page but it's always in the center regardless to whatever I do in order to bringin it to the left side , I'm using picture enviroment . I also looked at the similar problems but the solution did not work . this is the code which I'm using . which changes should I make in order to solve this problem? here I put 2 codes one of them is when i'm not using English and all the commands will work but the second one is when I'm using Farsi language where this problem remains :
\documentclass[a4]{book}
\usepackage{color}
\usepackage{graphicx}
\usepackage{pict2e}
\textwidth =12cm
\textheight =19cm
\usepackage{amsmath,amssymb}
\usepackage{pict2e}
\begin{document}
\begin{figure}[htp!]
\setlength{\unitlength}{0.1cm}
\linethickness{0.3mm}
\begin{picture}(0,20)
\put(0,0){\vector(1,0){40}}
\put(42,0){$x$}
\put(0,0){\vector(0,1){30}}
\put(0,32){$y$}
\put(0,0){\color{red}\vector(2,1){30}}
\put(30,16){$(x,y)$}
\put(29,-4){$x$}
\put(-4,16){$y$}
\put(9,1){$\theta$}
\put(14,10){$r$}
\multiput(0,15)(0.8,0){38}{\line(1,0){0.3}}
\multiput(29.5,0)(0,0.8){20}{\line(0,1){0.3}}
\end{picture}
\caption{ I want name below gragh }
\end{figure}
\end{document}
the Second one :
\documentclass[a4]{book}
\usepackage{caption}
\usepackage{color}
\usepackage{graphicx}
\usepackage{pict2e}
\textwidth =12cm
\textheight =19cm
\usepackage{amsmath,amssymb}
\usepackage{pict2e}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Zar}
\setdigitfont[Scale=1]{XB Zar}
\begin{document}
\begin{figure}[!hb]
\setlength{\unitlength}{0.1cm}
\linethickness{0.3mm}
\begin{LTR}
\begin{picture}(0,20)
\put(0,0){\vector(1,0){40}}
\put(42,0){$x$}
\put(0,0){\vector(0,1){30}}
\put(0,32){$y$}
\put(0,0){\color{red}\vector(2,1){30}}
\put(30,16){$(x,y)$}
\put(29,-4){$x$}
\put(-4,16){$y$}
\put(9,1){$\theta$}
\put(14,10){$r$}
\multiput(0,15)(0.8,0){38}{\line(1,0){0.3}}
\multiput(29.5,0)(0,0.8){20}{\line(0,1){0.3}}
\end{picture}
\end{LTR}
\captionsetup{singlelinecheck=false}
\caption {نمایشِ قطبیِ یک نقطه}
\end{figure}
\end{document}

captionpackage to control the placement of the caption, as described in the answer to How can I left-align a caption?. If this solves your problem, please us know, so this question can be closed as a duplicate. Otherwise, please edit your question with more detail about what doesn't work. – Jake Jul 10 '11 at 06:53