#!/usr/bin/env python

import sys
import numpy as np
import matplotlib.pyplot as pl

A = np.loadtxt('/dev/stdin', delimiter=',')

if len(A.shape) == 1:
	pl.plot(A)
	pl.show()
elif len(A.shape) == 2 and A.shape[1] == 2:
	pl.plot(A[:, 0], A[:, 1])
	pl.show()
else:
	print('pyplot: shape {} not supported, must be (n, 1) or (n, 2)'.format(A.shape))
