你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 12:36:51 +08:00
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.
这个提交包含在:
@@ -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
|
||||||
|
在新工单中引用
屏蔽一个用户