The melting transition in hexane and decane monolayers are studied through use of a canonical ensemble molecular dynamics (MD) simulation method, where the monolayer is physisorbed onto a single, infinite graphite slab, with another confining graphite slab some varying vertical distance from the monolayer. Using a simple united-atom model to depict the alkanes, simulations suggest that the monolayer melting transition is largely dependent upon the average density of the physisorbed monolayer in addition to the spacing between the two graphite slabs. In particular, hexane is studied at two distinct coverages: (i) a fully commensurate (FC) monolayer, and (ii) a uniaxially incommensurate (UI) monolayer with an average density 0.9 times that of the FC monolayer. In the case of no confinement, both the FC hexane and decane monolayers exhibit a power law relation between the melting temperature of the monolayer and the graphite slab separation. In contrast, the UI hexane monolayer deviates from this behavior, suggesting that the power law behavior is an effect of the in-plane space, and how the monolayer melting transition depends upon this in-plane space. Finally, the role of the top (confining) layer corrugation in the power-law relationship, and the importance of this study toward future applications are briefly discussed.