This is a handwritten note that I'm currently working on, can someone help me with the code in LaTeX
2 Answers
Are you looking for something like this?
\begin{tikzpicture}
\filldraw[fill=gray,dashed] (1,1) circle (0.75);
\draw[->] (0,-2) -- (0,2);
\draw[->] (-2,0) -- (2,0);
\node[fill, circle, inner sep=1pt, label={below:$x$}] at (1,1) {};
\end{tikzpicture}
As general introductory pointers, \draw is good for basic shapes like lines/arrows, circles, etc. while nodes (\node) are useful for text. The optional arguments in the brackets after these commands (fill, dashed, etc.) give specifications/modifiers for the object being drawn. For example, \draw[dashed] will result in a dashed shape.
I would recommend consulting the TikZ/PGF manual for great help with basic TikZ and more information on these modifiers. I've found it useful to Ctrl+F through when I find answers here on SE using commands I'm unfamiliar with. Good luck!
- 11
-
can you help me with shading the axes between x-e and x+e? – Atmaja Santra Aug 17 '21 at 22:11
As starting point:
\documentclass[border=3.141592, tikz]{standalone}
\usetikzlibrary{arrows.meta,
patterns.meta}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}[
> = Straight Barb,
P/.style = {pattern={Lines[angle=45, distance={2pt}, line width=0.1pt]},
pattern color=gray}
]
\draw[->] (-1,0) node[above] {$\mathbb{R}$} -- (2.2,0);
\foreach \i[count=\x from 0] in {x-\varepsilon, x, x+\varepsilon}
\draw (0.2+0.8*\x,2pt) -- ++ (0,-4pt) node[below] {$\i$};
\path[P] (0.2,0) rectangle (1.8,0.2);
\begin{scope}[yshift=-33mm]
\draw[P] (1,1) circle[radius=0.8];
\draw[->] (-1,0) node[above=8mm] {$\mathbb{R}^2$} -- (2.2,0);
\draw[->] (0,-1) -- (0,2);
\node[fill, circle, inner sep=1pt, label=below:$x$] at (1,1) {};
\end{scope}
\end{tikzpicture}
\end{document}
- 296,517


