supports log scale, filtering invalid tuples (e.g., <=0 for log scale)
added test for scales