## 1 Introduction  
The study of vegetation categorization based on species co-occurrence and its relationship to environmental factors is known as phytosociology [1; 2]. This research area has resulted in major vegetation appraisal techniques and methodologies that may be linked to ecosystem services and biodiversity conservation [3]. Species composition, community structure, and function are the most significant ecological features of forest ecosystems, and they all change in response to environmental changes [4; 5]. Factors such as vegetation type, slope, aspect, edaphic variables, and altitude [6; 7] influence the community composition, structure, and distribution pattern of diversity in mountain vegetation [8]. Elevation is an important variable in mountain ecosystems [9] since it affects the structure of the vegetation in most mountains across the world [10]. Most of the environmental factors, as well as species diversity [11; 12], change concurrently along the altitudinal gradient [13]. This aspect fosters habitat heterogeneity and induces micro-environmental alteration in vegetation patterning [14; 15]. [PERSON] and [PERSON] [16] reported that species richness in vascular plants increases with temperate latitude. Vegetation associations with ecological diversity are considered as a proportion of the quality of the entire ecosystem [17]. For this reason, vegetation in relation to environmental variables has been an important topic in recent years [18]. In Pakistan, Deodar (_Cedrus deodara_ (Roxb. ex D.Don) G.Don) is found in Murree, Hazara, Abbottabad, Swat, Azad Kashmir, Kaghan Valley, Kohistan Chillas, Dir, and Chitral. It is mostly a dry temperate plant, although scattered stands of this species can be found in moist temperate regions [19]. A majority of these forests are found in the transitional zone between dry and moist temperate zones, with no clear boundary between the two [20]. Deodar grows on ridge tops and moderate (17\({}^{\circ}\)) to steep (50\({}^{\circ}\)) slopes in Northern areas, ranging in elevation from 1650 m (Kaghan) to 2927 m (Chitral) in moist temperate, dry temperate, and timberline regions [21]. According to [PERSON] et al. [19], _Cedrus deodara_ forests gradually extend into the dry inner valleys of the Himalayas. [PERSON] and [PERSON] [20] have compiled a comprehensive report on the ecology and vegetation types of Pakistan's lesser Himalaya. They further noted that Deodar trees cannot endure extremely moist environments and are thus restricted to the Himalayan drier zones. Following the observational vegetation surveys by [PERSON] et al. [19] and [PERSON] [22], plenty of quantitative phytosociological studies have been conducted across the nation by several researchers. [PERSON] et al. [23] carried out an extensive quantitative sampling in the Deodar forests of the Hindu Kush and Himalayan ranges of Pakistan, and they identified _Cedrus deodara, Pinus wallichiam, P. gerardiana_, and _Abies pindrow_ as the dominant species in the recorded plant communities. Phytosociological work from Ayubia National Park [24] was reported three decades ago, and it was reported about a decade ago in the Sarsawa Hills, District Kotli of Azad Kashmir [25]. The former study reported five plant communities, i.e., _Acacia modesta-Cannabis sativa, Acacia modesta-Cynodon dactyllon, Acacia modesta-Themeda anathera, Acacia modesta-Dodonaea viscosa_, and _Acacia modesta-Lantana camara_. The latter identified nine communities (i.e., _Pinus-Poa-Maytenus, Myrsine-Themeda-Pinus, Colebrokia-Themeda-Dodonaea, Themeda-Carissa-Adhatoda, Themeda-Dodonaea-Eriophorum, Adhatoda-Themeda, Carissa-Myrsine-Themeda, Carissa-Themeda-Dodonaea, and Dodonaea-Carissa-Pinus_) at different elevations. The structure and distribution patterns of plant communities in Himalayan forests are poorly understood [26]. The Northwestern Himalaya is a unique bioregion because of its variable topographical and ecological complexity throughout a vast altitudinal range.