Sure, here is a Python script that accepts file names as command line arguments and plots the data from each file on the same graph:

Python
import matplotlib.pyplot as plt
import sys

def plot_data(filename):
  """Plots the data from the given text file on a graph."""

  x = []
  y = []

  with open(filename, "r") as f:
    for line in f:
      x_value, y_value = line.split()
      x.append(float(x_value))
      y.append(float(y_value))

  plt.plot(x, y, label=filename)

if __name__ == "__main__":
  """Plots the data from all of the given text files on the same graph."""

  for filename in sys.argv[1:]:
    plot_data(filename)

  plt.xlabel("X")
  plt.ylabel("Y")
  plt.legend()
  plt.show()
Use code with caution. Learn more
To use the script, simply save it as a Python file (e.g. plot_data.py) and run it from the command line, passing the names of the text files that you want to plot as arguments:

python plot_data.py data1.txt data2.txt data3.txt
This will plot the data from all three text files on the same graph.