0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

テキストデータを読み込んで散布図の作成

Last updated at Posted at 2019-10-19
import numpy as np
import matplotlib.pyplot as plt

x = np.loadtxt(a1.dat, usecols=2) # 2列目
y = np.loadtxt(a1.dat, usecols=3) # 3列目

fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title(Compare two methods, fontsize=20)
ax.set_xlabel(Method1, fontsize=18)
ax.set_ylabel(Method2, fontsize=18)

plt.scatter(x, y, s=600, c=pink, alpha=0.5, linewidths=2, edgecolors=red)
plt.savefig(compare.png) # Save as an image
plt.show() # show on your display

図のあたりは、他のページを参照したので、これが良いのかわかりませんが、とりあえず、それらしきものは作れます。見た目は、scatterの後の数字やらをいじくればなんとかなります。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?