I found some discussions about the opacity parameter in pstricks, but I still can't make it work. Here is my tex file:
\documentclass{article}
\usepackage{pstricks}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-2,-2)(2,2)
\psset{fillstyle=solid}
\psline[linecolor=blue,linewidth=12pt](-2,-2)(2,2)
\psframe[fillcolor=red,opacity=0.5](-1,-1)(1,1)
\end{pspicture}
\end{document}
I compile it on Ubuntu using:
latex opacity.tex
dvips opacity.dvi
but in the PS file, there is no transparency.
What should I do to see the picture with the transparency effect?

PostScriptdoes not know of transparency. Try to make a standalone.epsfile from your picture/diagram and convert it.pdfthen withepstopdfor something similar. – Apr 22 '14 at 06:55ps2pdf opacity.psto the sequence of commands. This makes transparency visible in a PDF viewer. – AlexG Apr 22 '14 at 07:01