Graphics, Figures & TablesPSTricks | Shading a certain Area

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

PSTricks | Shading a certain Area

Post by coachbennett1981 »

I need to shade the following system of inequalities. The shading would the be the IV quadrant up to the intersection point. I need some help.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{pstricks-add}

\begin{document}

\psframebox[fillstyle=solid,fillcolor=black!10,framesep=0pt]{%
\begin{pspicture*}(-3.2,-3.2)(6,6)
\pscustom[fillstyle=solid,fillcolor=blue!20,linestyle=none,algebraic]{%
    \psplot{-3}{3}{ 1.5*x-2 }
    \psline(2.31,1.46)(-1,-4)(5,-4)
  }
  \psplot[linewidth=1.25pt,algebraic,linestyle=dashed,arrows=<->,arrowinset=0,arrowsize=4pt]{-3}{3}{1.5*x-2}
  \psplot[linewidth=1.25pt,algebraic,arrows=<->,arrowinset=0,arrowsize=4pt]{-1}{6}{-.6666*x+3}  
  \psaxes{<->}(0,0)(-3,-3)(5.8,5.8)[$x$,-90][$y$,0]
\end{pspicture*}
}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks | Shading a certain Area

Post by CrazyHorse »

coachbennett1981 wrote:I need to shade the following system of inequalities. The shading would the be the IV quadrant up to the intersection point. I need some help.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{pstricks-add}

\begin{document}

\psframebox[fillstyle=solid,fillcolor=black!10,framesep=0pt]{%
\begin{pspicture*}(-3.2,-3.2)(6,6)
\pscustom[fillstyle=solid,fillcolor=blue!20,linestyle=none,algebraic]{%
    \psplot{-3}{2.31}{ 1.5*x-2 }
    \psplot{2.31}{10}{ -1/1.5*x+3 }
  }
  \psplot[linewidth=1.25pt,algebraic,linestyle=dashed,arrows=<->,arrowinset=0,arrowsize=4pt]{-3}{3}{1.5*x-2}
  \psplot[linewidth=1.25pt,algebraic,arrows=<->,arrowinset=0,arrowsize=4pt]{-1}{6}{-.6666*x+3}  
  \psaxes{<->}(0,0)(-3,-3)(5.8,5.8)[$x$,-90][$y$,0]
\end{pspicture*}
}
\end{document}
Attachments
output
output
xx.png (3.91 KiB) Viewed 2631 times
Post Reply