21 lines
442 B
Python
Executable File
21 lines
442 B
Python
Executable File
#! /usr/bin/env python
|
|
|
|
import argparse
|
|
import plotly.graph_objects as go
|
|
import numpy
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('filenames', nargs='*')
|
|
args = parser.parse_args()
|
|
|
|
print(args)
|
|
|
|
fig = go.Figure()
|
|
|
|
for datafilename in args.filenames:
|
|
data = numpy.loadtxt(datafilename, delimiter="\t", usecols=[0,1,2,3])
|
|
x = [line[0] for line in data]
|
|
y = [line[3] for line in data]
|
|
fig.add_trace(go.Bar(x=x, y=y))
|
|
fig.show()
|