smarter automatic x scaling