Graphics, Figures & Tablescolor in graphic

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mathselpi
Posts: 30
Joined: Wed Dec 31, 2008 4:50 pm

color in graphic

Post by mathselpi »

I would not a color in graphics so I want help to me.

Code: Select all

\pscustom[fillstyle=solid,fillcolor=yellow]{
\psplot{-1}{3}
{x x add }
\psplot{-1}{6}
{x  }}
\pscircle(2,0){2}
\pscircle(4,0){4}

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

color in graphic

Post by localghost »

mathselpi wrote:I would not a color in graphics so I want help to me.
Your request is very difficult to understand. Be more precise and build a minimal working example (MWE) to point out the problem exactly.


Best regards and welcome to the board
Thorsten¹
mathselpi
Posts: 30
Joined: Wed Dec 31, 2008 4:50 pm

color in graphic

Post by mathselpi »

I want to make a color in A region.but ı could not.

Code: Select all

\documentclass[12pt]{report}
\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{color}
\begin{document}
\begin{pspicture}(-2,-3)(9,9)
\psaxes[%linecolor=Blue,%
tickstyle=bottom,
ticksize=5pt]%
{<->}%
(0,0)(-4,4)(8.5,-4)
\put(2.3,3){A}
\pscustom[fillstyle=solid,fillcolor=yellow]{
\psplot{-1}{3}
{x x add }
\psplot{-1}{6}
{x  }}
\pscircle(2,0){2}
\pscircle(4,0){4}
\end{pspicture}
\end{document} 
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

color in graphic

Post by localghost »

mathselpi wrote:I want to make a color in A region.but ı could not.
OK, that's a step ahead. Some slight modifications and a few supplements will do the trick.

Code: Select all

\documentclass{minimal}
\usepackage[svgnames]{xcolor}
\usepackage{pst-plot,pstricks-add}

\begin{document}
  \begin{pspicture}[showgrid=true](-4,-4)(9,6)
    \psaxes[tickstyle=bottom,ticksize=3pt]{<->}(0,0)(-4,6)(9,-4)
    \pscustom[fillstyle=solid,fillcolor=yellow,linestyle=none]{%
      \psplot{0}{3}{x x add}
      \psplot{0}{3}{x}
      \psline[liftpen=1](6,6)(3,6)
    }
    \rput(2.3,3){A}
    \psplot{-1}{3}{x x add}
    \psplot{-1}{6}{x}
    \pscircle(2,0){2}
    \pscircle(4,0){4}
  \end{pspicture}
\end{document} 
mathselpi
Posts: 30
Joined: Wed Dec 31, 2008 4:50 pm

color in graphic

Post by mathselpi »

Thanks. Firstly I am sorry.I wouldn't talk about this problem exactly.I must make a color amongst big,small circle and y=x,y=2x which is A region. Also I am sorry because of my bad english.
mathselpi
Posts: 30
Joined: Wed Dec 31, 2008 4:50 pm

Re: color in graphic

Post by mathselpi »

anybody here?? please help me :(
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: color in graphic

Post by phi »

We still don't understand your problem. If you cannot explain it, try to make a sketch or something.
mathselpi
Posts: 30
Joined: Wed Dec 31, 2008 4:50 pm

color in graphic

Post by mathselpi »

mathselpi
Posts: 30
Joined: Wed Dec 31, 2008 4:50 pm

color in graphic

Post by mathselpi »

This is the solution.

Code: Select all

\documentclass{minimal}
\usepackage[svgnames]{xcolor}
\usepackage{pstricks-add}

\begin{document}
  \begin{pspicture}(-4,-4)(9,6)
    \psaxes[tickstyle=bottom,ticksize=3pt]{<->}(0,0)(-4,6)(9,-4)
    \pscustom[fillstyle=solid,fillcolor=pink,linestyle=none]{%
      \psplot{0}{3}{x x add}
      \psplot{0}{3}{x}
      \psarc(4,0){4}{90}{128}
    }
    \pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{%
      \psplot{0}{3}{x x add}
      \psplot{0}{3}{x}
      \psarc(2,0){2}{90}{128}
    }
    \rput(2.3,3){A}
    \psplot{-1}{3}{x x add}
    \psplot{-1}{6}{x}
    \pscircle(2,0){2}
    \pscircle(4,0){4}
  \end{pspicture}
\end{document} 
Post Reply