Modified setup of matplotlib for Linux and Windows to force using QT5 backend. Problem is that with conda installed qt5/pyqt5 matplotlib still tries to use qt4 backend.

这个提交包含在:
Craig Warren
2016-09-19 14:34:56 +01:00
父节点 177c6f5d0a
当前提交 f0f6c98ebb
共有 12 个文件被更改,包括 56 次插入1 次删除

查看文件

@@ -21,6 +21,7 @@ import datetime
from importlib import import_module from importlib import import_module
import os import os
import pickle import pickle
import sys
from time import perf_counter from time import perf_counter
from colorama import init, Fore, Style from colorama import init, Fore, Style
@@ -440,6 +441,10 @@ def plot_optimisation_history(fitnessvalueshist, optparamshist, optparamsinit):
optparamshist (dict): Name of parameters to optimise and history of their values optparamshist (dict): Name of parameters to optimise and history of their values
""" """
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
# Plot history of fitness values # Plot history of fitness values

查看文件

@@ -1,7 +1,12 @@
import argparse import argparse
import os import os
import sys
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec import matplotlib.gridspec as gridspec

查看文件

@@ -22,6 +22,10 @@ import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec import matplotlib.gridspec as gridspec

查看文件

@@ -22,6 +22,10 @@ import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from gprMax.exceptions import CmdInputError from gprMax.exceptions import CmdInputError

查看文件

@@ -21,7 +21,10 @@ import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib as mpl import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from tools.plot_fields import plot_Ascan from tools.plot_fields import plot_Ascan

查看文件

@@ -18,9 +18,14 @@
import argparse import argparse
import os import os
import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec import matplotlib.gridspec as gridspec

查看文件

@@ -18,9 +18,14 @@
import argparse import argparse
import os import os
import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from gprMax.exceptions import CmdInputError from gprMax.exceptions import CmdInputError

查看文件

@@ -18,9 +18,14 @@
import argparse import argparse
import os import os
import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec import matplotlib.gridspec as gridspec

查看文件

@@ -18,8 +18,13 @@
import argparse import argparse
import os import os
import sys
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from gprMax.exceptions import CmdInputError from gprMax.exceptions import CmdInputError

查看文件

@@ -7,9 +7,14 @@
import argparse import argparse
import os import os
import sys
import h5py import h5py
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from gprMax.constants import c, z0 from gprMax.constants import c, z0

查看文件

@@ -7,8 +7,13 @@
import argparse import argparse
import os import os
import sys
import numpy as np import numpy as np
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from gprMax.constants import c, z0 from gprMax.constants import c, z0

查看文件

@@ -9,6 +9,10 @@ import os
import sys import sys
import h5py import h5py
import matplotlib
# Make sure QT5 is used if not on Mac OS X
if sys.platform != 'darwin':
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
from scipy import signal from scipy import signal