0

x^2+y^2=16

I want to draw a image like this using tikz. How should I do that?

1

enter image description here

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=3]
\draw[step=,gray,thick] (-1,-1) grid (4.5,4.5);
\filldraw[
            fill=red!40,
            draw=red!80!black,ultra thick,
            opacity=.5
            ] 
            (0,0) -- (4cm,0mm)
arc [start angle=0, end angle=90, radius=4cm] -- cycle;
\draw[->] (-1,0) -- (4,0);
\draw[->] (0,-1) -- (0,4);
\node at(0,0) (node name)[below,xshift=-4pt] {0};
\node at(0,2) (node name)[left,fill=white,xshift=-2pt] {2};
\node at(0,4) (node name)[left,fill=white,xshift=-2pt] {4};
\node at(2,0) (node name)[below,fill=white, yshift=-2pt] {2};
\node at(4,0) (node name)[below,fill=white, yshift=-2pt] {4};
\end{tikzpicture}
\end{document}
| improve this answer | |
  • Very good and I like the empty space near the numbers. – Sebastiano Jul 7 at 16:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.