Let $\displaystyle \pi_1:\mathbb{R} \times \mathbb{R}, (x, y) \mapsto \pi_1(x, y)=x$, let $\displaystyle X$ be the subspace $\displaystyle (\{0\}\times \mathbb{R})\cup (\mathbb{R}\times \{0\}) \subseteq \mathbb{R} \times \mathbb{R}$

Prove $\displaystyle f=\pi_1|_X$ is a closed map but not an open map.