In [ ]:
import matplotlib
import matplotlib.pyplot as plt
In [ ]:
#Import required modules
from mtpy.imaging import penetration_depth3d as pen3d
# Set path to edi files to include in the plot and define savepath
edi_path = r'C:/mtpywin/mtpy/Alison_penetrationDepth3D/EDI_files' # unequal periods across EDI files
#edi_path = r"E:/Data/MT_Datasets/Cloncurry" # unequal periods across EDI files
#edi_path = r'C:/mtpywin/mtpy/examples/data/edi2'
savepath = r'C:/tmp'
# Create plot for a period index number 1,2,3 ..., 10 for determinant. This may not make sense sometimes.
# The recommended case is to use a float value for the period.
# pen3d.plot_latlon_depth_profile(edi_path, 21.3333, 'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
# pen3d.plot_latlon_depth_profile(edi_path, 10922.63,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
#pen3d.plot_latlon_depth_profile(edi_path, 31.6,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
pen3d.plot_latlon_depth_profile(edi_path, 21.0,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
In [ ]:
breakpoint
Behind the scenes, matplotlib also interacts with different backends. A backend is the workhorse behind actually rendering a chart. (On the popular Anaconda distribution, for instance, the default backend is Qt5Agg.) Some backends are interactive, meaning they are dynamically updated and “pop up” to the user when changed.
While interactive mode is off by default, you can check its status with plt.rcParams['interactive'] or plt.isinteractive(), and toggle it on and off with plt.ion() and plt.ioff(), respectively. See more https://realpython.com/python-matplotlib-guide/
In [ ]:
In [ ]:
plt.rcParams['interactive'] # or plt.isinteractive(),
In [ ]:
#and toggle it on and off with plt.ion() and plt.ioff(), respectively:
plt.ion()
print (plt.rcParams['interactive'] )
In [ ]:
# plt.ioff()
# print (plt.rcParams['interactive'] )
In [ ]:
# to check all config params of matplotlib
# print (matplotlib.rcParams)
In [ ]:
In [ ]: