Page 1 of 1

\documentclass{standalone}
\standaloneconfig{border=2mm 2mm 2mm 2mm}

%maths
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}

%tikzpicture
\usepackage{tikz}
\usepackage{scalerel}
\usepackage{pict2e}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\usetikzlibrary{patterns,arrows.meta}
\usetikzlibrary{shadows}
\usetikzlibrary{external}

%pgfplots
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{statistics}
\usepgfplotslibrary{fillbetween}

%colours
\usepackage{xcolor}

\begin{document}

\pgfplotsset{
   standard/.style={
      axis line style = thick,
      trig format=rad,
      enlargelimits,
      axis x line=middle,
      axis y line=middle,
      enlarge x limits=0.15,
      enlarge y limits=0.15,
      every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
      every axis y label/.style={at={(current axis.above origin) },anchor=south east},
      grid=both,
      ticklabel style={font=\tiny, fill=white}
   }
}

\begin{tikzpicture}
   \begin{axis}[standard,
         xtick={0.1,0.2,0.5,1},
         ytick={0.1,0.2,0.5,1,2},
         xticklabels={$0.1$,$0.2$,$0.5$,$1$},
         yticklabels={$0.1$,$0.2$,$0.5$,$1$,$2$},
         xlabel={ $x$},
         ylabel={ $y$},
         samples=1000,
         xmin=0, xmax=1.3,
      ymin=0, ymax=1.3]

      \node[anchor=center, label=south west:$O$] at (axis cs:0,0){};
      \addplot[name path=F, line width=0.3mm, blue, domain={0:2}]{sqrt(x)} node[pos=0.8, above left] {$C_f$};
      \path[name path=xAxis] (axis cs: 0,0) -- (axis cs: 1,0);
      \addplot[fill=black, fill opacity=0.2] fill between [of=xAxis and F, soft clip={domain=0.2:1}];
      \node[anchor=center, label=south east:$A(x)$] at (axis cs:0.5,0.5){};
   \end{axis}
\end{tikzpicture}

\end{document}


Leave a comment if you like this content أترك تعليقا إن أعجبك المحتوى

Class: Figures
Views:  319




0 Comments, Latest

No comments yet. Be the first to Comment

Most viewed courses: