Potential-pH diagrams for complex systems