robust implementation for vertical alignment of graph and pH scales