def create_chart(temperatures: List[float], extra_point_temperatures: List[float]=None) -> ScatterChart: chart = ScatterChart() chart.scatterStyle = "smoothMarker" temperatures_copy = [t for t in temperatures] if extra_point_temperatures is not None: for extra in extra_point_temperatures: for temperature in temperatures: if math.isclose(extra, temperature, abs_tol=0.5): temperatures_copy.remove(temperature) chart.x_axis.scaling.min = round(temperatures_copy[0], 1) - 1 chart.x_axis.scaling.max = round(temperatures_copy[-1], 1) + 1 return chart