我有以下 MWE
\documentclass[pstricks,border=0pt]{standalone}
\usepackage{pst-node, pst-coil, pst-plot}
\begin{document}
\begin{psgraph}[axesstyle=frame,Ox=0, Dx=0.1, Dy=0.1](0,0)(1.05,1.05){0.8\linewidth}{2.5in}%
\pslegend[rt]{
\red\rule[1ex]{2em}{1pt} & Theoretical \\
\blue\rule[1ex]{2em}{1pt} & Numerical}
\end{psgraph}
\end{document}
我希望\rule
“数值”旁边的是一个圆圈(点)。我尝试使用\dot
,但出现了错误。有办法吗?
答案1
\documentclass[pdf,border=10pt]{standalone}
\usepackage{pst-plot}
\begin{document}
\psset{llx=-1cm,lly=-5mm,urx=5mm,ury=5mm}
\begin{psgraph}[axesstyle=frame,Dx=0.1,Dy=0.1](0,0)(1.05,1.05){0.8\linewidth}{2.5in}%
\pslegend[rt]{%
\makebox[2em][l]{\psline[linecolor=red,linewidth=1pt](0,1ex)(2em,1ex)} & Theoretical \\
\makebox[2em][r]{\pscircle*[linecolor=blue](0,1ex){0.7ex}} & Numerical (with pstricks )\\
\makebox[2em][r]{\pscircle*[linecolor=red](0,1ex){0.7ex}} & Numerical (with pict2e)
}
\end{psgraph}
\end{document}
答案2
这就是你想要的东西吗?我给出了两种方法,一种是使用 pstricks 本身(你必须给出圆的半径),另一种是使用 picte2e
(给出其直径)。
\documentclass[pdf,border=0pt]{standalone}
\usepackage{pst-node, pst-coil, pst-plot}
\usepackage{pict2e} \begin{document}
\begin{pspicture}
\begin{psgraph}[axesstyle=frame,Ox=0, Dx=0.1, Dy=0.1](0,0)(1.05,1.05){0.8\linewidth}{2.5in}%
\pslegend[rt]{%
\red\rule[1ex]{2em}{1pt} & Theoretical \\
\raisebox{0.75ex}{\makebox[1.7em][r]{\pscircle*[linewidth = 1pt, linecolor = blue]{0.9mm}}} & Numerical (with pstricks )\\%
\blue\raisebox{0.75ex}{\makebox[1.7em][r]{\circle*{1.8mm}}} & Numerical (with pict2e)
}
\end{psgraph}
\end{pspicture}
\end{document}