Centrality in connected graphs via convexity or concavity