How to generate the above plot with pgfplots?
I have an example code here:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines=middle,axis equal,grid=both]
\addplot coordinates{(-3,1) (6,-2)};
\end{axis}
\end{tikzpicture}
\end{document}
which will generate a figure as shown below:
I don't want grid lines to be drawn full.
Only small xticks and yticks are needed.
Don't want dots to be placed at the ends of line.
Best Answer
It can be easily done with
pstricks
: