From d1c19c9f2a2d206055e68c4431a08fea5e4028e4 Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Fri, 14 Oct 2022 10:27:01 +0800 Subject: [PATCH] 0.0.144 --- API_Reference.py | 4 ++-- PyPI/setup.cfg | 2 +- PyPI/src/guan.egg-info/PKG-INFO | 2 +- PyPI/src/guan/__init__.py | 9 ++++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/API_Reference.py b/API_Reference.py index 9260d0c..57bcedb 100644 --- a/API_Reference.py +++ b/API_Reference.py @@ -270,7 +270,7 @@ wilson_loop_array = guan.calculate_wilson_loop(hamiltonian_function, k_min=-math x_array, y_array = guan.read_one_dimensional_data(filename='a', file_format='.txt') -x_array, y_array = guan.read_one_dimensional_complex_data(filename='a', file.format='txt') +x_array, y_array = guan.read_one_dimensional_complex_data(filename='a', file_format='txt') x_array, y_array, matrix = guan.read_two_dimensional_data(filename='a', file_format='.txt') @@ -293,7 +293,7 @@ guan.print_array(array, show_index=0, index_type=0) plt, fig, ax = guan.import_plt_and_start_fig_ax(adjust_bottom=0.2, adjust_left=0.2, labelsize=20) -guan.plot_without_starting_fig(plt, fig, ax, x_array, y_array, xlabel='x', ylabel='y', title='', fontsize=20, style='', y_min=None, y_max=None, linewidth=None, markersize=None) +guan.plot_without_starting_fig(plt, fig, ax, x_array, y_array, xlabel='x', ylabel='y', title='', fontsize=20, style='', y_min=None, y_max=None, linewidth=None, markersize=None, color=None) guan.plot(x_array, y_array, xlabel='x', ylabel='y', title='', fontsize=20, labelsize=20, show=1, save=0, filename='a', file_format='.jpg', dpi=300, style='', y_min=None, y_max=None, linewidth=None, markersize=None, adjust_bottom=0.2, adjust_left=0.2) diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index e28d01b..814bce7 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.0.143 +version = 0.0.144 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan.egg-info/PKG-INFO b/PyPI/src/guan.egg-info/PKG-INFO index 686cc41..5d572bf 100644 --- a/PyPI/src/guan.egg-info/PKG-INFO +++ b/PyPI/src/guan.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: guan -Version: 0.0.143 +Version: 0.0.144 Summary: An open source python package Home-page: https://py.guanjihuan.com Author: guanjihuan diff --git a/PyPI/src/guan/__init__.py b/PyPI/src/guan/__init__.py index c773b33..c1576ee 100644 --- a/PyPI/src/guan/__init__.py +++ b/PyPI/src/guan/__init__.py @@ -2,7 +2,7 @@ # With this package, you can calculate band structures, density of states, quantum transport and topological invariant of tight-binding models by invoking the functions you need. Other frequently used functions are also integrated in this package, such as file reading/writing, figure plotting, data processing. -# The current version is guan-0.0.143, updated on December 10, 2022. +# The current version is guan-0.0.144, updated on December 14, 2022. # Installation: pip install --upgrade guan @@ -2176,8 +2176,11 @@ def import_plt_and_start_fig_ax(adjust_bottom=0.2, adjust_left=0.2, labelsize=20 [label.set_fontname('Times New Roman') for label in labels] return plt, fig, ax -def plot_without_starting_fig(plt, fig, ax, x_array, y_array, xlabel='x', ylabel='y', title='', fontsize=20, style='', y_min=None, y_max=None, linewidth=None, markersize=None): - ax.plot(x_array, y_array, style, linewidth=linewidth, markersize=markersize) +def plot_without_starting_fig(plt, fig, ax, x_array, y_array, xlabel='x', ylabel='y', title='', fontsize=20, style='', y_min=None, y_max=None, linewidth=None, markersize=None, color=None): + if color==None: + ax.plot(x_array, y_array, style, linewidth=linewidth, markersize=markersize) + else: + ax.plot(x_array, y_array, style, linewidth=linewidth, markersize=markersize, color=None) ax.set_title(title, fontsize=fontsize, fontfamily='Times New Roman') ax.set_xlabel(xlabel, fontsize=fontsize, fontfamily='Times New Roman') ax.set_ylabel(ylabel, fontsize=fontsize, fontfamily='Times New Roman')