【发布时间】:2020-04-28 10:12:51
【问题描述】:
我试图在一张图中绘制三个文件中的数据。截至目前,我尝试只做两个文件。它们都被绘制成图表,但在两个不同的数字中。 我希望它们出现在一个图形/图形/窗口中。
如果我需要在不降级的情况下更新问题的任何部分,请告诉我。我真的很感激。我愿意接受任何建议。非常感谢!
样本数据 1:
20190601T034207 NAME cc130.aa.bb NAME-7600816.2005 1 1 NAME-37x161 37x161 d39c13 2821 0 0ce000 1283 JOBS/NAME-7600816.2005/blast-37-161.txt
20190601T034214 NAME cc128.aa.bb NAME-7600816.2004 1 1 NAME-37x161 37x161 d39c13 2815 0 0ce000 1283 JOBS/NAME-7600816.2004/blast-37-161.txt
20190601T034208 NAME nn019.aa.bb NAME-7600816.2008 1 1 NAME-37x161 37x161 d39c13 3465 0 0ce000 1283 JOBS/NAME-7600816.2008/blast-37-161.txt
20190601T034220 NAME nn058.aa.bb NAME-7600816.2010 1 1 NAME-37x161 37x161 d39c13 3462 0 0ce000 1283 JOBS/NAME-7600816.2010/blast-37-161.txt
20190601T034217 NAME nn011.aa.bb NAME-7600816.2014 1 1 NAME-37x161 37x161 d39c13 3469 0 0ce000 1283 JOBS/NAME-7600816.2014/blast-37-161.txt
20190601T034219 NAME nn224.aa.bb NAME-7600816.2015 1 1 NAME-37x161 37x161 d39c13 3468 0 0ce000 1283 JOBS/NAME-7600816.2015/blast-37-161.txt
更新:
def file_processing (file_name, scatter_color, ax):
ax.scatter(x,y, s=4, c=scatter_color, label=file_name)
if args.File1:
file1=args.File1
fig = plt.figure(figsize=(12.80,9.60),dpi=100)
ax = fig.add_subplot(1,1,1)
file_processing(file1, "blue", ax)
if args.File2:
file2=args.File2
fig = plt.figure(figsize=(12.80,9.60),dpi=100)
ax = fig.add_subplot(1,1,1)
file_processing(file2, "green",ax)
if args.File3:
file3=args.File3
fig = plt.figure(figsize=(12.80,9.60),dpi=100)
x = fig.add_subplot(1,1,1)
file_processing(file3, "red",ax)
【问题讨论】:
标签: python matplotlib plot scatter