1

Is there a way to use pstricks \lput*{:U}{68.3\% with a transparent background?

Here is my MWE:

\documentclass[pstricks]{standalone}
\usepackage{pst-func,pst-node,amsmath,xfp}
\begin{document}
    \definecolor{fillColor}{RGB}{125, 185, 250}
    \psset{yunit=10cm,xunit=1.5} 
    \begin{pspicture}(-4.7,-1)(4.5,0.7)
        
\pscustom[fillstyle=solid,fillcolor=fillColor!25,linestyle=none]{%
    \psline(-3,0)\psGauss[mue=0,sigma=1]{-3}{3}\psline(3,0)}        
        \pscustom[fillstyle=solid,fillcolor=fillColor!50,linestyle=none]{%
            \psline(-2,0)\psGauss[mue=0,sigma=1]{-2}{2}\psline(2,0)}
\pscustom[fillstyle=solid,fillcolor=fillColor!75,linestyle=none]{%
        \psline(-1,0)\psGauss[mue=0,sigma=1]{-1}{1}\psline(1,0)}
\psaxes[xAxis=false, yAxis=true,Dy=0.1,showorigin=true,tickstyle=bottom]{->}(-3.7,0)(-3.5,0)(3.5,0.6)[$$,0][$f(x)$,-140]
\psaxes[yAxis=false,Dy=0.25,labels=none,ticks=none]{<->}(0,0)(-3.5,-1)(3.5,0.6)
\psGauss[linecolor=fillColor, linewidth=1.5pt,mue=0,sigma=1]{-3.2}{3.2}%
        
\psline[linestyle=dashed, linecolor=gray!50](-3,0)(-3,0.1)
\psline[linestyle=dashed, linecolor=gray!50](-2,0)(-2,0.2)
\psline[linestyle=dashed, linecolor=gray!50](-1,0)(-1,0.3)
\psline[linestyle=dashed, linecolor=gray!50](0,0)(-0,0.45)
\psline[linestyle=dashed, linecolor=gray!50](1,0)(1,0.3)
\psline[linestyle=dashed, linecolor=gray!50](2,0)(2,0.2)
\psline[linestyle=dashed, linecolor=gray!50](3,0)(3,0.1)


\multido{\iA=-3+1,\iB=-3+1}{3}{\psxTick(\iA){\mu \iB $\sigma$}}
\psxTick(-0){$\mu$}
\psxTick(1){$\mu+1\sigma$}
\psxTick(2){$\mu+2\sigma$}
\psxTick(3){$\mu+3\sigma$}


\rput[rt](4,-0.04){$x$}
\rput[rt](4,-0.125){$z$}    
\psaxes[yAxis=false,Dy=0.25, linecolor=white,ticksize=8pt]{}(0,-0.1)(-3.5,0)(3.5,0.6)
\pcline[fillcolor=fillColor]{<->}(-1,0.24)(1,0.24){\lput*{:U}{68.3\%}}

        
\end{pspicture}
    
\end{document}

enter image description here

I would like to get the background color around the 68.3% text box.

Thanks!

1 Answer 1

1
    \pcline{<->}(-1,0.24)(1,0.24)\ncput{\colorbox{fillColor!75}{68.3\%}}

enter image description here

1
  • Thank you @user187802
    – JPMD
    Sep 22, 2022 at 15:27

You must log in to answer this question.

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