3

Can you change the opacity in surfaces/plots in PSTricks pst-3dplot ?

\documentclass[%
  pstricks,%
  border=12pt%
]{standalone}

\usepackage{pst-3dplot}

\begin{document}

\begin{pspicture}(-3,-1.5)(3,4)
\pstThreeDCoor[%
  xMin=-4,%
  xMax=4,%
  yMin=-4,%
  yMax=4,%
  zMax=3,%
  arrows=<->%
]
\psplotThreeD[%
  plotstyle=line,%
  linecolor=blue,%
  yPlotpoints=40,%
  xPlotpoints=30,%
  linewidth=0.5pt,%
  hiddenLine=true%
](-2,2)(-2,2)
{
  x 100 mul cos y 100 mul sin sub
}
\rput[tl](-2,3.5){$f(x,y) = \cos(100x) - \sin(100y)$}
\end{pspicture}

\end{document}
1

1 Answer 1

4

There are several tricks for effecting the opacity in pstricks, in this context what you want to use is strokeopacity. So try:

\psplotThreeD[%
  strokeopacity=0.2,
  plotstyle=line,%
  linecolor=blue,%
  yPlotpoints=40,%
  xPlotpoints=30,%
  linewidth=0.5pt,%
  hiddenLine=true%
](-2,2)(-2,2)
{
  x 100 mul cos y 100 mul sin sub
}

enter image description here

If you're filling a figure, then simply using the key opacity should work.

\begin{pspicture}(-2,-2)(2,4)
    \psset{fillstyle=solid}
    \pscircle[fillcolor=blue](0,0){2}
    \psellipse[fillcolor=yellow,opacity=0.75](1,2)(1,2)
\end{pspicture}

enter image description here

1
  • 1
    7 seconds too slow Commented Jun 13, 2013 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .