Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions freecad/plot/init_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@
import os, sys

import matplotlib

# Force matplotlib to use PySide backend by temporarily unloading PyQt
PyQt5WasLoaded = False
if 'PyQt5.QtCore' in sys.modules:
del sys.modules['PyQt5.QtCore']
PyQt5WasLoaded = True

import matplotlib.pyplot as plt

if PyQt5WasLoaded:
import PyQt5.QtCore

matplotlib.use("module://freecad.plot.freecad_backend")
matplotlib.style.use('seaborn-colorblind')
matplotlib.rcParams["figure.facecolor"] = "efefef"
Expand Down