We investigate the NP-hard label number maximization problem (LNM): Given a set of rectangular labels Λ, each of which belongs to a point feature in the plane, the task is to find a labeling for a largest subset ΛP of Λ. A labeling is a placement such that none of the labels overlap and each λ ∈ ΛP is placed according to a labeling model: In the discrete models, the label must be placed so that the labeled point coincides with an element of a predefined subset of corners of the rectangular label; in the continuous or slider models, the point must lie on a subset of boundaries of the label. Obviously, the slider models allow a continuous movement of a label around its point feature, leading to a significantly higher number of labels that can be placed. We present exact algorithms for this problem that are based on a pair of so-called constraint graphs that code horizontal and vertical positioning relations. The key idea is to link the two graphs by a set of additional constraints, thus characterizing all feasible solutions of LNM. This enables us to formulate a zero–one integer linear program whose solution leads to an optimal labeling. We can express LNM in both the discrete and the slider labeling models. To our knowledge, we present the first algorithm that computes provably optimal solutions in the slider models. We find it remarkable that our approach is independent of the labeling model and results in a discrete algorithm even if the problem is of continuous nature as in the slider models. Extensive experimental results on both real-world instances and point sets created by a widely used benchmark generator show that the new approach – although being an exponential time algorithm – is applicable in practice.