If $I=[0,1]$, let $f:I\to I$ be an involution. Then $\sim_f:=\Delta_I\cup \text{Gr}(f)\subseteq I^2$ defines an equivalence relation on $I$ where $\Delta_I=\{(t,t):t\in I\}$ is the diagonal of $I$ and $\text{Gr}(f)=\{(t,f(t)):t\in I\}$ is the graph of the function $f$. My question then is
Q: What involutions $f$ are such that $\sim_f$ is closed as a subspace of $[0,1]^2$?
For example, if $f$ is continuous, then $\text{Gr}(f)$ is closed and so is $\sim_f$. But this is clearly not a necessary condition. Also, if $\text{Fix}(f)$ is open and $f\vert_{I\setminus\text{Fix}(f)}$ continuous, then $\sim_f=\Delta_{I}\cup\text{Gr}(f\vert_{I\setminus\text{Fix}(f)})$ is again close. But, again, this is not a necessary condition. So are there stronger sufficient/necessary conditions? Or even a more intrinsic characterization for such functions?
Note that an equivalence relation is given by an involution as above $\iff\forall t\in [0,1]:|[t]|\leq2$. This is because, if $\sim$ is such that $\forall t\in I:|[t]|\leq2$, we can define $f:I\to I$ as $$f(t)=\begin{cases}t & \text{if } [t]=\{t\}\\ t'&\text{if }[t]=\{t,t'\}\end{cases}$$ which is an involution such that $\sim_f=\sim$.