root2matplotlib: improve automatic plot range setting