If we use the Van-der-Waals equation then a plot of Z vs reduced pressure can be constructed. By using reduced values, i.e. pressure and temperature relative to the critical values then a general plot can be made on which data from many different molecules can be superimposed. Look under sections dealing with the Law of Corresponding states in your textbook. From such a plot then it is possible to determine whether the attractive or repulsive part of the potential is the dominant one.
The figure shows such a plot of Z vs. reduced pressure $P_R$ at different reduced temperatures. The reduced temperature is $T_R=T/T_c$ where T is the actual temperature and $T_c$ the temperature at the critical point.

From the figure when $T_R \lt 2$ and $P_R \lt 6.5$ then $Z \lt 1$ and this indicates that a real gas (in so far as such is described by the Van-der-Waals eqn) has a lower pressure than an ideal gas and so this indicates that the molecules are more influenced by the attractive part of the potential than its repulsive part, which is due to their finite molecular volume. If the temperature is higher, above $T_R \approx 2$ (not shown), then Z is positive for all pressures, and similarly above $Z \approx 7$ for all temperatures. In these cases repulsion dominates over attraction.