To find the value of \( x \) such that \( f(x) = 4 \), we need to look at the ordered pairs provided in the mapping diagram:
- (2, 4)
- (-3, 0)
- (-1, -1)
- (4, 3)
From the ordered pairs, we can see that \( f(2) = 4 \). This means when \( f(x) = 4 \), the corresponding value for \( x \) is 2.
Therefore, when \( f(x) = 4 \), the value of \( x \) is \( \boxed{2} \).