From 55e2b1bb3f7518dfbba1351c53e1a41621dd98f8 Mon Sep 17 00:00:00 2001 From: Stephen Dade Date: Sun, 24 Nov 2024 15:07:08 +1100 Subject: [PATCH] magfit: Use wxagg on Windows --- MAVProxy/modules/lib/magfit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAVProxy/modules/lib/magfit.py b/MAVProxy/modules/lib/magfit.py index ffee4e88cb..df6a0ed6f7 100644 --- a/MAVProxy/modules/lib/magfit.py +++ b/MAVProxy/modules/lib/magfit.py @@ -7,7 +7,7 @@ from MAVProxy.modules.lib import wx_processguard from MAVProxy.modules.lib.wx_loader import wx -import sys, time, os, math, copy +import sys, time, os, math, copy, platform from pymavlink import mavutil from pymavlink import mavextra @@ -18,6 +18,8 @@ from MAVProxy.modules.lib.multiproc_util import MPDataLogChildTask import matplotlib +if platform.system() == "Windows": + matplotlib.use('wxagg') import matplotlib.pyplot as pyplot import numpy import datetime