# Preimage of continuous one-to-one function on connected domain is not continuous. [duplicate]

I know that given $$B$$, a compact subset of $$\mathbb{R}^n$$, and $$f : B \to \mathbb{R}^m$$, a continuous injective (one-to-one) function, $$f^{-1}$$ is continuous on $$f(B)$$. (This true).

I also know that image $$f(X)$$ of a connected subset $$X$$ is connected under a continuous function.

Now let $$X$$ be a connected (non-compact) subset of $$\mathbb{R}^n$$, and $$f : X \to \mathbb{R}^m$$ be a continuous injective (one-to-one) function. I am trying (and struggling) to provide a counterexample in which mapping $$f^{-1} : f(X) \mapsto X$$ is not continuous on $$f(X)$$. (A rigorous, parametrized example).

$$f:[0,2\pi)\to S^1\subset \mathbb{R}^2$$ such that $$f(x)=(\mathrm{cos}(x),\mathrm{sin}(x))$$