\documentclass[border=5mm,tikz]{standalone}
\usepackage{amssymb}
\usepackage{pgfplots}
\usepgfplotslibrary{patchplots}
\usetikzlibrary{patterns, positioning, arrows, decorations.markings}
\pgfplotsset{compat=1.8}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% Functions i
\path[->] (0.8, 0) edge [bend right] node[left, xshift=-2mm] {$\phi_i$} (-1, -2.9);
\draw[white,fill=white] (0.06,-0.57) circle (.15cm);
\path[->] (-0.7, -3.05) edge [bend right] node [right, yshift=-3mm] {$\phi^{-1}_i$} (1.093, -0.11);
\draw[white, fill=white] (0.95,-1.2) circle (.15cm);
% Functions j
\path[->] (5.8, -2.8) edge [bend left] node[midway, xshift=-5mm, yshift=-3mm] {$\phi^{-1}_j$} (3.8, -0.35);
\draw[white, fill=white] (4,-1.1) circle (.15cm);
\path[->] (4.2, 0) edge [bend left] node[right, xshift=2mm] {$\phi_j$} (6.2, -2.8);
\draw[white, fill=white] (4.54,-0.12) circle (.15cm);
% Manifold
\draw[smooth cycle, tension=0.4, fill=white, pattern color=brown, pattern=north west lines, opacity=0.7] plot coordinates{(2,2) (-0.5,0) (3,-2) (5,1)} node at (3,2.3) {$M$};
% Help lines
%\draw[help lines] (-3,-6) grid (8,6);
% Subsets
\draw[smooth cycle, pattern color=orange, pattern=crosshatch dots] plot coordinates {(1,0) (1.5, 1.2) (2.5,1.3) (2.6, 0.4)};
node [label={[label distance=-0.3cm, xshift=-2cm, fill=white]:$U_i$}] {};
\draw[smooth cycle, pattern color=blue, pattern=crosshatch dots]
plot coordinates {(4, 0) (3.7, 0.8) (3.0, 1.2) (2.5, 1.2) (2.2, 0.8) (2.3, 0.5) (2.6, 0.3) (3.5, 0.0)}; node [label={[label distance=-0.8cm, xshift=.75cm, yshift=1cm, fill=white]:$U_j$}] {};
% First Axis
\draw[thick, ->] (-3,-5) -- (0, -5) node [label=above:$\phi_i(U_i)$] {};
\draw[thick, ->] (-3,-5) -- (-3, -2) node [label=right:$\mathbb{R}^m$] {};
% Arrow from i to j
\draw[->] (0, -3.85) -- node[midway, above]{$\psi_{ij}$} (4.5, -3.85);
% Second Axis
\draw[thick, ->] (5, -5) -- (8, -5) node [label=above:$\phi_j(U_j)$] {};
\draw[thick, ->] (5, -5) -- (5, -2) node [label=right:$\mathbb{R}^m$] {};
% Sets in R^m
\draw[white, pattern color=orange, pattern=crosshatch dots] (-0.67, -3.06) -- +(180:0.8) arc (180:270:0.8);
\fill[even odd rule, white] [smooth cycle] plot coordinates{(-2, -4.5) (-2, -3.2) (-0.8, -3.2) (-0.8, -4.5)} (-0.67, -3.06) -- +(180:0.8) arc (180:270:0.8);
\draw[smooth cycle] plot coordinates{(-2, -4.5) (-2, -3.2) (-0.8, -3.2) (-0.8, -4.5)};
\draw (-1.45, -3.06) arc (180:270:0.8);
\draw[white, pattern color=blue, pattern=crosshatch dots] (5.7, -3.06) -- +(-90:0.8) arc (-90:0:0.8);
\fill[even odd rule, white] [smooth cycle] plot coordinates{(7, -4.5) (7, -3.2) (5.8, -3.2) (5.8, -4.5)} (5.7, -3.06) -- +(-90:0.8) arc (-90:0:0.8);
\draw[smooth cycle] plot coordinates{(7, -4.5) (7, -3.2) (5.8, -3.2) (5.8, -4.5)};
\draw (5.69, -3.85) arc (-90:0:0.8);
\end{tikzpicture}
\begin{tikzpicture}[>=latex]
\coordinate (a) at (0,0);
\coordinate (b) at (4,0);
\coordinate (c) at (0,-3);
\draw (-2,-3) node[left] {$\mathbb{R}^1$}--(2,-3) (0,-2.9)--(0,-3.1) node[below] {$f(P)$};
\draw[dashed,->,postaction={
decorate,
decoration={
markings,
mark=at position 0.6 with \coordinate (x);
}
}] plot[smooth] coordinates {(b) (3,-1) (1,-2) (c)};
\draw (x) node[below right] {$f\circ g^{-1}$};
\draw[->,postaction={
decorate,
decoration={
markings,
mark=at position 0.6 with \coordinate (y);
}
}] plot[smooth] coordinates {(a) (-.4,-.5) (-.1,-2) (c)};
\draw (y) node[left] {$f$};
\draw[orange,thick,->,postaction={
decorate,
decoration={
markings,
mark=at position 0.6 with \coordinate (z);
}
}] plot[smooth] coordinates {(a) (2,.25) (3.5,0) (b)};
\draw [orange](z) node[above] {$g$};
\fill (a) circle (1.5pt) node[above right] {$P$} (b) circle (1.5pt) node[above] {$g(P)$};
\draw (-.1,.1) circle (0.8) ++(185:0.8) node[right] {$U$};
\draw[very thick,rounded corners=3mm] (-1.5,0)--(-1.3,.5)--(-.8,1.2)--(0,1)--(1.5,1.2)--(1.75,.5)--(0.875,-.7)--(0,-1)--(-1,-.8)--cycle;
\draw (-1.5,0) node[right] {$M$};
\draw (3.9,-.1) circle (0.8);
\draw[very thick] (3,1)--(5.5,1)--(5,-1.3)--(2.5,-1.3)--cycle;
\draw (5.5,1) node[below left] {$\mathbb{R}^n$};
\draw[ultra thin] (4,-.5)--++(.2,-1) node[below] {$g(U)$};
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}
\addplot[color=red]{exp(x)};
\addplot[color=orange]{10*x+5};
\end{axis}
\end{tikzpicture}
%Here ends the first plot
%\hskip 5pt
%Here begins the 3d plot
\begin{tikzpicture}
\begin{axis}
\addplot3[
surf,
]
{exp(-x^2-y^2)*x};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
axis lines = left,
xlabel = $x$,
ylabel = {$f(x)$},
]
%Below the red parabola is defined
\addplot [
domain=-10:10,
samples=100,
color=red,
]
{x^2 - 2*x - 1};
\addlegendentry{$x^2 - 2x - 1$}
%Here the blue parabloa is defined
\addplot [
domain=-10:10,
samples=100,
color=blue,
]
{x^2 + 2*x + 1};
\addlegendentry{$x^2 + 2x + 1$}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title={Temperature dependence of CuSO$_4\cdot$5H$_2$O solubility},
xlabel={Temperature [\textcelsius]},
ylabel={Solubility [g per 100 g water]},
xmin=0, xmax=100,
ymin=0, ymax=120,
xtick={0,20,40,60,80,100},
ytick={0,20,40,60,80,100,120},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
]
\addplot[
color=blue,
mark=square,
]
coordinates {
(0,23.1)(10,27.5)(20,32)(30,37.8)(40,44.6)(60,61.8)(80,83.8)(100,114)
};
\legend{CuSO$_4\cdot$5H$_2$O}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
x tick label style={
/pgf/number format/1000 sep=},
ylabel=Year,
enlargelimits=0.05,
legend style={at={(0.5,-0.1)},
anchor=north,legend columns=-1},
ybar interval=0.7,
]
\addplot
coordinates {(2012,408184) (2011,408348)
(2010,414870) (2009,412156) (2008,415 838)};
\addplot
coordinates {(2012,388950) (2011,393007)
(2010,398449) (2009,395972) (2008,398866)};
\legend{Men,Women}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title=Exmple using the mesh parameter,
hide axis,
colormap/cool,
]
\addplot3[
mesh,
samples=50,
domain=-8:8,
]
{sin(deg(sqrt(x^2+y^2)))/sqrt(x^2+y^2)};
\addlegendentry{$\frac{sin(r)}{r}$}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}
[
title={Contour plot, view from top},
view={0}{90}
]
\addplot3[
contour gnuplot={levels={0.8, 0.4, 0.2, -0.2}}
]
{sin(deg(sqrt(x^2+y^2)))/sqrt(x^2+y^2)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}
\addplot3[
surf,
]
coordinates {
(0,0,0) (0,1,0) (0,2,0)
(1,0,0) (1,1,0.6) (1,2,0.7)
(2,0,0) (2,1,0.7) (2,2,1.8)
};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}
[
view={60}{30},
]
\addplot3[
domain=0:5*pi,
samples = 60,
samples y=0,
]
({sin(deg(x))},
{cos(deg(x))},
{x});
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\draw[step=0.25cm,color=gray] (-1,-1) grid (1,1);
\draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle;
\end{tikzpicture}
\begin{tikzpicture}
% Define the points of a regular pentagon
\path (0,0) coordinate (origin);
\path (0:1cm) coordinate (P0);
\path (1*72:1cm) coordinate (P1);
\path (2*72:1cm) coordinate (P2);
\path (3*72:1cm) coordinate (P3);
\path (4*72:1cm) coordinate (P4);
% Draw the edges of the pentagon
\draw (P0) -- (P1) -- (P2) -- (P3) -- (P4) -- cycle;
% Add "spokes"
\draw (origin) -- (P0) (origin) -- (P1) (origin) -- (P2)(origin) -- (P3) (origin) -- (P4);\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) -- ++(1,0) -- ++(1,1) -- ++(1,-1);
\draw (0,0) -- +(1,0) -- +(0,-1) -- +(-1,0) -- +(0,1);
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) rectangle (1,1) rectangle (3,2) rectangle (4,3);
\draw (0,0) circle (1cm) circle (0.6cm) circle (0.2cm);
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) ellipse (2cm and 1cm) ellipse (0.5cm and 1 cm) ellipse (0.5cm and 0.25cm);\end{tikzpicture}
\begin{tikzpicture}
\draw (0:1cm) -- (0:2cm) arc (0:60:2cm) -- (60:1cm) arc (60:0:1cm) -- cycle;
\end{tikzpicture}
\begin{tikzpicture}[scale=2.5]
\tikzstyle{every node}=[draw,shape=circle];
\path (0:0cm)node (v0) {$v_0$};
\path (0:1cm)node (v1) {$v_1$};
\path (72:1cm) node (v2) {$v_2$};
\path (2*72:1cm) node (v3) {$v_3$};
\path (3*72:1cm) node (v4) {$v_4$};
\path (4*72:1cm) node (v5) {$v_5$};
\draw (v0) -- (v1)
(v0) -- (v2)
(v0) -- (v3)
(v0) -- (v4)
(v0) -- (v5);
\end{tikzpicture}
\begin{tikzpicture}
\draw[smooth,domain=0:6.5] plot function{sin(2*x)*exp(-x/4)};
\end{tikzpicture}
\begin{tikzpicture}
\draw[ycomb,color=gray,line width=0.5cm] plot coordinates{(1,1) (2,2) (3,3)};
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\clip (0,0) circle (1cm);
\fill[black] (0cm,1cm) rectangle (-1cm,-1cm);
\end{tikzpicture}
\begin{tikzpicture}
\draw (-2,1.5) rectangle (2,-1.5);
\begin{scope}
\clip (-0.5,0) circle (1cm);
\clip (0.5,0) circle (1cm);
\fill[color=gray] (-2,1.5) rectangle (2,-1.5);
\end{scope}
\draw (-0.5,0) circle (1cm);
\draw (0.5,0) circle (1cm);
\end{tikzpicture}
\begin{tikzpicture}
\begin{scope}[color=gray,line width=4pt]
\draw (0,0) -- (2,2);
\draw (2,0) -- (0,2);
\draw (-1,1) circle (1cm);
\end{scope}
\draw (0,0) -- (-2,-2);
\draw (0,-2) -- (-2,0);
\draw (1,-1) circle (1cm);
\end{tikzpicture}
\end{document}