A diagnostic diagram for γ Doradus variables and slowly pulsating B-type stars