3

First of all I want to thank you if you read my post.

So I use the package tikz of LaTeX I want to fill a specific area. I searched alot and found some solutions with fill between and addplot but for different reasons I want to keep the \draw command.

Here's my code:

\documentclass[10pt,aps,prb,twocolumn, nofootinbib]{revtex4-1}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{amssymb,amsmath}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{color}
\usepackage{hyperref}
\usepackage{listings}
\hypersetup{
    bookmarks=true,         % show bookmarks bar?
    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat’s toolbar?
    pdfmenubar=true,        % show Acrobat’s menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdfauthor={Kevin Multani},     % author
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=blue,          % color of internal links
    citecolor=red,        % color of links to bibliography
}
\graphicspath{{figures/}}
\newcommand{\ut}{\ensuremath{\frac{\partial u}{\partial t}}}
\newcommand{\uxx}{\ensuremath{\frac{\partial^2 u}{\partial x^2}}}
\newcommand{\Qt}{\ensuremath{\frac{dQ}{dt}} }
\newcommand{\fixme}{{\bf **FIXME**}}
\renewcommand{\labelitemi}{$\vcenter{\hbox{\tiny$\bullet$}}$}
\begin{document}
 \begin{tikzpicture}[scale=1.2]
%vertical & horizontal axis
\draw[->](0,0) --(6,0) node [right] {$\mu$};
\draw[->](0,0) --(0,4) node [left] {$\gamma(\mu)$};
\coordinate [label={[black] below:0}] (S) at (0,0);
\coordinate [label={[black] below:1}] (S) at (5.6,0);
\coordinate [label={[black] left:1}] (S) at (0,3.7);

% Lines & Curves
\draw [thick, blue](0,0) -- (4,0);
\draw[dashed](5.6,0)--(5.6,4);

\draw [thick, blue] plot [smooth, tension=1] coordinates { (4,0) (5,1) (5.3,3) };
\draw[dashed](0,4)--(5.6,4);
\draw[dashed](5.6,0)--(5.6,4);
\coordinate [label={left:$\gamma=\mu$}] (S) at (5.1,3);

%title
\node[align=center,font=\bfseries, yshift=2em] (title) 
    at (current bounding box.north)
    {Summary of the Signaling Model};
\end{tikzpicture}
\end{document}

Which yields the following result:

https://i.sstatic.net/HNg7p.png

I want to fill the area above left the blue curve with some west lines. Unfortunally reading the documentation on clip & fill did not give me a good result (some spaces were missing).

Again thank you if you have any solutions

1
  • It is not an MWE ... Commented Aug 30, 2017 at 13:04

1 Answer 1

3

I found a solution. The idea is to place 4 points on the graph to delimit frontiers. What to add:

  \fill[color=brown!20, opacity=0.3]
(0,0)--(3,0)
-- plot [smooth, tension=1] coordinates { (4,0) (5,1) (5.3,3) }
-- (0,3) --cycle;

You must log in to answer this question.

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