0.1.113
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| [metadata] | ||||
| # replace with your username: | ||||
| name = guan | ||||
| version = 0.1.112 | ||||
| version = 0.1.113 | ||||
| author = guanjihuan | ||||
| author_email = guanjihuan@163.com | ||||
| description = An open source python package | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| Metadata-Version: 2.1 | ||||
| Name: guan | ||||
| Version: 0.1.112 | ||||
| Version: 0.1.113 | ||||
| Summary: An open source python package | ||||
| Home-page: https://py.guanjihuan.com | ||||
| Author: guanjihuan | ||||
|   | ||||
| @@ -302,10 +302,10 @@ def draw_dots_and_lines(coordinate_array, draw_dots=1, draw_lines=1, max_distanc | ||||
|     import numpy as np | ||||
|     import matplotlib.pyplot as plt | ||||
|     coordinate_array = np.array(coordinate_array) | ||||
|     print(coordinate_array.shape) | ||||
|     x_range = max(coordinate_array[:, 0])-min(coordinate_array[:, 0]) | ||||
|     y_range = max(coordinate_array[:, 1])-min(coordinate_array[:, 1]) | ||||
|     fig, ax = plt.subplots(figsize=(6*x_range/y_range,6)) | ||||
|     ax.set_aspect('equal') # important code ensuring that the x and y axes have the same scale. | ||||
|     plt.subplots_adjust(left=0, bottom=0, right=1, top=1) | ||||
|     plt.axis('off') | ||||
|     if draw_lines==1: | ||||
|   | ||||
| @@ -307,7 +307,7 @@ def write_one_dimensional_data_without_opening_file(x_array, y_array, f): | ||||
|         i0 += 1 | ||||
|  | ||||
| # 在文件中写入XYZ数据(一行一组x, y, z) | ||||
| def write_one_dimensional_data(x_array, y_array, z_array, filename='a', file_format='.txt'): | ||||
| def write_xyz_data(x_array, y_array, z_array, filename='a', file_format='.txt'): | ||||
|     import guan | ||||
|     with open(filename+file_format, 'w', encoding='UTF-8') as f: | ||||
|         write_xyz_data_without_opening_file(x_array, y_array, z_array, f) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user