Here's the plot for $f(n)=\frac{3n+1}{2^k}$ ($n$ integer, positive, odd) where $k$ is the number of 2 factors in $3n+1$:
Just to be clear, here's a zoom in:
Why do we see those straight lines? I assume it should be something trivial, but I fail to prove this.
Edit #1 Here's how $k(n)$ looks like:



$f_k (n) = \frac{3}{2^k} n + \frac{1}{2^k} = a_k n + b_k $ which is a linear function.