diff --git a/apple_health_parser/interfaces/plot_interface.py b/apple_health_parser/interfaces/plot_interface.py index 432fda4..4999f61 100644 --- a/apple_health_parser/interfaces/plot_interface.py +++ b/apple_health_parser/interfaces/plot_interface.py @@ -67,16 +67,16 @@ def _get_plot_settings(self) -> PlotSettings: legend = None title = None title_yaxis = None - - match self.flag: - case "HKQuantityTypeIdentifierHeartRate": + + # Special case for the heart rate flag ot include the motion context + if self.flag == "HKQuantityTypeIdentifierHeartRate" and self.oper is None: x = "start_date" y = "value" color = "motion_context" legend = "Motion Context" - case _: - x = "date" - y = "value" + else: + x = "date" + y = "value" match self.title: case True: @@ -157,7 +157,7 @@ def plot( figure.write_html(output_dir / f"{filename}.html") else: figure.write_image( - file=output_dir / f"{filename}.{format}", format=format, scale=1 + file=output_dir / f"{filename}.{format}", format=format, scale=2 ) return figure