From 6e281b9500c26b3bdba6aac96ccfc23be393240c Mon Sep 17 00:00:00 2001 From: guanjihuan <34735497+guanjihuan@users.noreply.github.com> Date: Mon, 30 Aug 2021 14:16:52 +0800 Subject: [PATCH] update --- .../2020.12.23_plot_with_matplotlib/plot_2D_scatter.py | 4 +--- .../2020.12.23_plot_with_matplotlib/plot_3D_scatter.py | 4 +--- .../BBH_model_of_high_order_topological_insulator.py | 7 ++----- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/academic_codes/2020.12.23_plot_with_matplotlib/plot_2D_scatter.py b/academic_codes/2020.12.23_plot_with_matplotlib/plot_2D_scatter.py index 3147c93..2f82590 100755 --- a/academic_codes/2020.12.23_plot_with_matplotlib/plot_2D_scatter.py +++ b/academic_codes/2020.12.23_plot_with_matplotlib/plot_2D_scatter.py @@ -11,14 +11,12 @@ def main(): def Plot_2D_Scatter(x, y, value, xlabel='x', ylabel='y', title='title', filename='a'): - from matplotlib.axes._axes import _log as matplotlib_axes_logger - matplotlib_axes_logger.setLevel('ERROR') # 只显示error级别的通知 import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) plt.subplots_adjust(bottom=0.2, right=0.8, left=0.2) for i in range(np.array(x).shape[0]): - ax.scatter(x[i], y[i], marker='o', s=100*value[i], c=(1,0,0)) + ax.scatter(x[i], y[i], marker='o', s=100*value[i], c=[(1,0,0)]) ax.set_title(title, fontsize=20, fontfamily='Times New Roman') ax.set_xlabel(xlabel, fontsize=20, fontfamily='Times New Roman') ax.set_ylabel(ylabel, fontsize=20, fontfamily='Times New Roman') diff --git a/academic_codes/2020.12.23_plot_with_matplotlib/plot_3D_scatter.py b/academic_codes/2020.12.23_plot_with_matplotlib/plot_3D_scatter.py index 9aa5b8f..c2d3b5d 100755 --- a/academic_codes/2020.12.23_plot_with_matplotlib/plot_3D_scatter.py +++ b/academic_codes/2020.12.23_plot_with_matplotlib/plot_3D_scatter.py @@ -12,15 +12,13 @@ def main(): def Plot_3D_Scatter(x, y, z, value, xlabel='x', ylabel='y', zlabel='z', title='title', filename='a'): - from matplotlib.axes._axes import _log as matplotlib_axes_logger - matplotlib_axes_logger.setLevel('ERROR') # 只显示error级别的通知 import matplotlib.pyplot as plt from matplotlib.ticker import LinearLocator fig = plt.figure() ax = fig.add_subplot(111, projection='3d') plt.subplots_adjust(bottom=0.1, right=0.8) for i in range(np.array(x).shape[0]): - ax.scatter(x[i], y[i], z[i], marker='o', s=int(100*value[i]), c=(1,0,0)) + ax.scatter(x[i], y[i], z[i], marker='o', s=int(100*value[i]), c=[(1,0,0)]) ax.set_title(title, fontsize=20, fontfamily='Times New Roman') ax.set_xlabel(xlabel, fontsize=20, fontfamily='Times New Roman') ax.set_ylabel(ylabel, fontsize=20, fontfamily='Times New Roman') diff --git a/academic_codes/2021.01.23_BBH_model_of_high_order_topological_insulator/BBH_model_of_high_order_topological_insulator.py b/academic_codes/2021.01.23_BBH_model_of_high_order_topological_insulator/BBH_model_of_high_order_topological_insulator.py index d526f99..daa5742 100755 --- a/academic_codes/2021.01.23_BBH_model_of_high_order_topological_insulator/BBH_model_of_high_order_topological_insulator.py +++ b/academic_codes/2021.01.23_BBH_model_of_high_order_topological_insulator/BBH_model_of_high_order_topological_insulator.py @@ -78,16 +78,13 @@ def main(): Plot_2D_Scatter(x_array, y_array, DOS, xlabel='x', ylabel='y', title='BBH Model', filename='BBH Model') -def Plot_2D_Scatter(x, y, value, xlabel='x', ylabel='y', title='title', filename='a'): - from matplotlib.axes._axes import _log as matplotlib_axes_logger - matplotlib_axes_logger.setLevel('ERROR') # 只显示error级别的通知 +def Plot_2D_Scatter(x, y, value, xlabel='x', ylabel='y', title='title', filename='a'): import matplotlib.pyplot as plt - from matplotlib.ticker import LinearLocator fig = plt.figure() ax = fig.add_subplot(111) plt.subplots_adjust(bottom=0.2, right=0.8, left=0.2) for i in range(np.array(x).shape[0]): - ax.scatter(x[i], y[i], marker='o', s=1000*value[i], c=(1,0,0)) + ax.scatter(x[i], y[i], marker='o', s=1000*value[i], c=[(1,0,0)]) ax.set_title(title, fontsize=20, fontfamily='Times New Roman') ax.set_xlabel(xlabel, fontsize=20, fontfamily='Times New Roman') ax.set_ylabel(ylabel, fontsize=20, fontfamily='Times New Roman')