Let $\text{Dom}(f)=E$ be compact and $G_f=\{(x,f(x)): x\in E\}$ the graph of $f$.
$G_f$ is compact iff $f$ is continuous on $E$.
Proof: $\Rightarrow$ Let $f$ is not continuous at some point $x_0\in E$. Then $\exists \{x_n\}$ on $E$ such that $x_n\to x_0$ but $f(x_n)\nrightarrow f(x_0)$. It means that exists some subsequence $\{n_k\}$ such that $|f(x_{n_k})-f(x_0)|\geqslant \varepsilon_0$ for some $\varepsilon_0>0$. We'll define function $g:x\mapsto (x,f(x))$. Then $g(x_{n_k})=(x_{n_k},f(x_{n_k}))$ is sequence in $G_f$ which is compact. Thus this sequence has limit point in $G_f$ namely $(p,f(p))$. Hence $\exists \{k_j\}$ such that $g(x_{n_{k_j}})\to (p,f(p)).$ Hence $p=x_0$ and $f(x_{n_{k_j}})\to f(x_0)$ and we get contradiction. Right?
$\Leftarrow$ Let $\{G_{\alpha}\}$ be an open cover of $G_f$ i.e. $G_f\subset \cup _{\alpha}G_{\alpha}$. Consider "projections" of $G_{\alpha}$ to $E$ we define $F_{\alpha}:=\{x\in E: (x,f(x))\in G_{\alpha}\}.$ It's clear that $E\subset \cup _{\alpha}F_{\alpha}$. Also we define function $g:x\mapsto (x,f(x))$ and $g$ is continouos on $E\times f(E)$ since all his components are continuous. Then $g^{-1}(G_{\alpha})=F_{\alpha}$ is open for any $\alpha$. Since $E$ is compact then $\exists$ $\alpha_1, \cdots, \alpha_n$ such that $E\subset F_{\alpha_1}\cup \cdots\cup F_{\alpha_n}$. Then $g(E)\subset g(F_{\alpha_1})\cup\cdots \cup g(F_{\alpha_n})=G_{\alpha_1}\cup\cdots\cup G_{\alpha_n}.$ But $g(E)=G_f$.
Sorry if my topic is repeated but I solved it myself and canyone check my proof please?
I would be very grateful.