使用 psclip 和 psframe 时出错

使用 psclip 和 psframe 时出错

昨天我发布了一个问题,因为我需要使用 pspicture 填充两条曲线之间的空间,我很感谢大家的回答。这是帖子: 如何使用 pspicture 填充曲线之间的分隔空间 现在我尝试使用帮助我填充其他图形中的区域的代码,如下所示: 新形象 但是如果你能看到,图的底部有一种矩形,我不想要它:(而且我很确定“矩形”是由第 46 行我将在下面附加的代码,该行包含此命令\psframe[linecolor=colour2, fillstyle=solid, linewidth=0.02 ,linestyle=none](0.8, -1.4)(9.13, 2.928)。我该如何选择这些点(0.8, -1.4)(9.13, 2.928)以避免此图和我应该处理的其他图中出现错误?我需要在其他几个图中填充空间,第二个\psframe导致我出现错误。这是代码:

\documentclass[12pt]{article}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad}
\usepackage{pst-plot}
\usepackage{color}
\usepackage[labelfont=bf,font=small,justification=justified]{caption}
\input{tcilatex}

\begin{document}

\begin{center}
\begin{pspicture}(3.7,-3.762997)(10.56794,8.762997)

%COLORES
\definecolor{colour0}{rgb}{0.2,0.2,1.0} %Azul
\definecolor{colour1}{rgb}{1.0,0.0,0.2} %Rojo
\definecolor{colour2}{rgb}{0.8,0.8,0.8} %Gris claro (linea punteada)
\definecolor{colour3}{rgb}{0.0,0.2,1.0} %Azul
\definecolor{colour4}{rgb}{0.2,0.6,0.0} %Verde
\definecolor{bubblegum}{rgb}{0.99, 0.76, 0.8}
\definecolor{bananayellow}{rgb}{1.0, 0.88, 0.21}
%Además, se usan colores:
%MidnightBlue: Curva IC
%LimeGreen: Curva PC
%Black: Ejes
%Gray: Región de soluciones

%EJES
%Vertical:
\psline[linecolor=black, linewidth=0.03,  arrowsize=0.05291666666666667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.810012,-1.6741458)(0.810012,9.125854)
%Horizontal
\psline[linecolor=black, linewidth=0.03, arrowsize=0.05291666666666667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.810012,-1.6741458)(11.110012,-1.6741458)

%SOLUCION FACTIBLE
%Region de soluciones
\psclip{
    \pscustom[linestyle=none]{
        \psline(0.810012,-1.6741458)(6.7, 8.3)
        \psline(6.7, 8.3)(0.9, 8.3)
        \psbezier(0.9, 8.3)(1, 5)(5.655, -0.8)(10.5, -1.5)
        }}
\psframe[fillstyle=solid,fillcolor=colour2, opacity=0.3](0.810012,-1.6741458)(9, 8.95)
% or \psframe[fillstyle=vlines](0.810012,-1.6741458)(9,9.125854)
\endpsclip
\psframe[linecolor=colour2, fillstyle=solid,  linewidth=0.02 ,linestyle=none](0.8, -1.4)(9.13, 2.928)


%CURVAS
%Curva LLC
%Vertical
\psline[linecolor=bubblegum, linewidth=0.02, linestyle=dashed](0.835, -1.65)(0.835, 8.95)
%Horizontal
\psline[linecolor=bubblegum, linewidth=0.02, linestyle=dashed](0.84,-1.65)(10.85,-1.65)
%Curva IC
\psline[linecolor=MidnightBlue, linewidth=0.05](0.810012,-1.6741458)(6.7, 8.3)
%Curva PC
\psbezier[linecolor=LimeGreen, linewidth=0.05](0.9, 8.3)(1, 5)(5.655, -0.8)(10.5, -1.5)
%Curva Isocosto
\psline[linecolor=LimeGreen, linewidth=0.05](1.5, 4.5)(6, 1) %C*
\psline[linecolor=bananayellow, linewidth=0.05](2.5, 3.41)(6.4, 0.39)

\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](1.6, 4.42)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](1.85, 4.22)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](2.1, 4.02)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](2.35, 3.82)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](2.6, 3.62)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](2.85, 3.43)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](3.1, 3.25)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](3.35, 3.05)
%mitad
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](3.68, 2.8)%9
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](3.93, 2.6)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](4.18, 2.42)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](4.43, 2.22)

\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](4.68, 2.03)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](4.93, 1.83)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](5.18, 1.65)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](5.43, 1.46)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](5.68, 1.26)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](5.93, 1.06)
%Optimal Incentive S.
%\psline[linecolor=bubblegum, linewidth=0.05](3.21, 3.33)(0.8,5.2)


%TEXTO AGREGADO (Números, Letras, etc)
\rput[bl](0.73,-2.1076814){$\scriptstyle{0}$}
\rput[bl](10.93,-2.2076814){$w_{\scriptscriptstyle{F}}$}
\rput[bl](0.16,8.7){$w_{\scriptscriptstyle{E}}$}
\rput[bl](10.5, 8.2){$45^{\circ}$}

\rput[bl](0.16, 2.928){$w^{*}_{\scriptscriptstyle{E}}$}
\rput[bl](0.16, 1.9){$w^{t}_{\scriptscriptstyle{E}}$}

\rput[bl](3.35, -2.2076814){$w^{*}_{\scriptscriptstyle{F}}$}
\rput[bl](4.25, -2.2076814){$w^{t}_{\scriptscriptstyle{F}}$}

\rput[bl](1.1, 4.45){$\scriptstyle{C^{*}}$}

%INTERSECCIONES
%Línea 45 grados
\psline[linecolor=black, linewidth=0.0, linestyle=dashed, dash=0.18cm 0.11cm](0.81,-1.6741458)(10.5,8.02)

%Línea horizontal punteada de intersección UNO
\psline[linecolor=black, linewidth=0.0, linestyle=dashed, dash=0.18cm 0.11cm](0.810012, 1.93)(4.41, 1.93) 
%Línea vertical punteada de intersección UNO
\psline[linecolor=black, linewidth=0.0, linestyle=dashed, dash=0.18cm 0.11cm](4.41, -1.6741458)(4.41, 1.95)
%Interseccion UNO
\psdots[linecolor=black, dotsize=0.1](4.41, 1.93)

%Línea horizontal punteada de intersección DOS
\psline[linecolor=black, linewidth=0.0, linestyle=dashed, dash=0.18cm 0.11cm](0.810012, 2.928)(3.5, 2.928) 
%Línea vertical punteada de intersección DOS
\psline[linecolor=black, linewidth=0.0, linestyle=dashed, dash=0.18cm 0.11cm](3.52, -1.6741458)(3.52, 2.93)
%Interseccion DOS
\psdots[linecolor=black, dotsize=0.1](3.52, 2.928)


%LEYENDA
\psframe[linecolor=black, linewidth=0.01, fillstyle=solid, dimen=outer](16.070012,2.5)(10.110012,5.8)
%Recta mala
\psline[linecolor=bananayellow, linewidth=0.05](10.480012, 5.314146)(11.1133455, 5.314146)%1
%PC (binding)
\psline[linecolor=LimeGreen, linewidth=0.05](10.480012,4.85)(11.1133455,4.85)%2
%IC (binding)
\psline[linecolor=MidnightBlue, linewidth=0.05](10.480012,4.395854)(11.1133455,4.395854)%3
%LLC (binding)
\psline[linecolor=bubblegum, linewidth=0.05, linestyle=dashed, dash=0.13638889cm 0.10583334cm](10.480012,3.88)(11.1133455,3.88)%4
%Isocost %5
\psline[linecolor=LimeGreen, linewidth=0.05, 0.10583334cm](10.480012,3.45)(11.1133455,3.45)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](10.52, 3.45)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](10.80, 3.45)
\psdots[linecolor=black,fillcolor=white, dotstyle=o, dotsize=0.15](11.08, 3.45)
%Region solutions
\pspolygon[linecolor=gray, linewidth=0.02, fillstyle=solid,fillcolor=colour2, opacity=0.3](10.4, 2.85)(11.25, 2.85)(11.25, 3.05)(10.4, 3.05)%6

%Texto
\rput[bl](11.4733574, 5.2191875){\footnotesize : Tangent Solution}%2
\rput[bl](11.4733574, 4.7191875){\footnotesize : PC (binding)}%2
\rput[bl](11.4733574, 4.2191876){\footnotesize : IC (binding)}%3
\rput[bl](11.4733574, 3.7191876){\footnotesize : LLC Manager (binding)}%4
\rput[bl](11.4733574, 3.27){\footnotesize : Isocost representing $C^{*}$}%5
\rput[bl](11.4733574, 2.8){\footnotesize : Region of feasible solutions}%6

\end{pspicture}
\end{center}

{\footnotesize \textbf{Figure 10.} Linear incentives with logarithmic utility function. }

\end{document}

我将非常感激任何可以学习的评论、针对此案例的可能解决方案以及对其他案例的建议,谢谢 :)

答案1

以下代码有效:

...
%Black: Ejes
%Gray: Región de soluciones

%EJES
%Vertical:
%SOLUCION FACTIBLE
%Region de soluciones
\psclip{
    \pscustom[linestyle=none]{
        \psline(0.810012,-1.6741458)(6.7, 8.3)
        \psline(6.7, 8.3)(0.9, 8.3)
        \psbezier(0.9, 8.3)(1, 5)(5.655, -0.8)(10.5, -1.5)
        }}
\psframe[fillstyle=solid,fillcolor=colour2, opacity=0.3](0.810012,-1.6741458)(9, 8.95)
% or \psframe[fillstyle=vlines](0.810012,-1.6741458)(9,9.125854)
\endpsclip
\psframe[fillstyle=solid, fillcolor=white, linestyle=none](0.8,-1.8)(9.13, 2.928)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\psline[linecolor=black, linewidth=0.03,  arrowsize=0.05291666666666667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.810012,-1.6741458)(0.810012,9.125854)
%Horizontal
\psline[linecolor=black, linewidth=0.03, arrowsize=0.05291666666666667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(0.810012,-1.6741458)(11.110012,-1.6741458)
%CURVAS
%Curva LLC
%Vertical
%\psline[linecolor=bubblegum, linewidth=0.02, linestyle=dashed](0.835, -1.65)(0.835, 8.95)
%Horizontal
%\psline[linecolor=bubblegum, linewidth=0.02, linestyle=dashed](0.84,-1.65)(10.85,-1.65)

...

%Isocost %5
\psline[linecolor=LimeGreen, linewidth=0.05](10.480012,3.45)(11.1133455,3.45)

在此处输入图片描述

将来,我建议你应该学习渐近线!!

相关内容