図の更新

This commit is contained in:
2024-09-20 17:30:07 +09:00
parent 47599dbdda
commit 812387f67e
3 changed files with 6 additions and 5 deletions
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 KiB

After

Width:  |  Height:  |  Size: 353 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 KiB

After

Width:  |  Height:  |  Size: 318 KiB

+6 -5
View File
@@ -30,9 +30,9 @@ par.add_argument('-si', '--sheet_index', default=0, type=int,
par.add_argument('-hl', '--header', default=0, type=int,
help="header line number in excel file[0]")
par.add_argument('-m', '--mol_col', nargs=3, default=[0, 1, 2], type=int,
help="row number for mol percent [0 1 2]")
help="col number for mol percent [0 1 2]")
par.add_argument('-p', '--GC_col', default=3, type=int,
help="row number for G/C ratio [3]")
help="col number for G/C ratio [3]")
par.add_argument('-xmin', '--xmin', default=0, type=float,
help="x minimum [0]")
par.add_argument('-o', '--outfile', default=None,
@@ -168,7 +168,7 @@ def ScatterPlot(header, data, xlabel, val, psum=100, order=[1, 2, 0]):
zi = griddata((x, y), val, (xi[None, :], yi[:, None]),
method=args.interp)
zi[zi == 0] = 1e-8
alpha = 0.8
alpha = 0.7
level = np.linspace(0, 1, 20)
plt.contourf(xi, yi, zi, level, cmap=cmap, alpha=alpha)
# 内挿して得られる最大ポイントの表示
@@ -200,7 +200,7 @@ def ScatterPlot(header, data, xlabel, val, psum=100, order=[1, 2, 0]):
if args.nocolorbar is False:
cbar = fig.colorbar(cs, fraction=0.035, alpha=1.0)
cbar.ax.set_ylabel('glass vol%', fontsize=14)
cbar.ax.set_yticklabels(['%.0f' % (200 * x)
cbar.ax.set_yticklabels(['%.0f' % (100 * x)
for x in bounds], fontsize=12)
if args.nolegend is False:
ax.legend(loc="best")
@@ -210,9 +210,10 @@ def ScatterPlot(header, data, xlabel, val, psum=100, order=[1, 2, 0]):
# xlsデータの読み込み
df = pd.read_excel(args.xlsfile, skiprows=args.header)
df = df.dropna()
# mol_data = mol_data/18.67*100
mol_header = df.columns
mol_data = df.iloc[:, args.mol_col].to_numpy()
# mol_data = mol_data/18.67*100
val = df.iloc[:, args.GC_col].to_numpy()
print("Number of data : ", df.shape)
print("Plot header [col]: ", mol_header[args.mol_col].to_list(), args.mol_col)