You need to do two things: remove the superfluous dimensions from the y argument to plt.plot and convert your tensors to numpy, like so:
In [1]: import torch

In [2]: import matplotlib.pyplot as plt

In [3]: x = torch.ones(1200)

In [4]: y = torch.ones(1200, 1, 1, 1, 1, )

In [5]: x.size()
Out[5]: torch.Size([1200])

In [6]: y.size()
Out[6]: torch.Size([1200, 1, 1, 1, 1])

In [7]: y.squeeze().size()
Out[7]: torch.Size([1200])

In [8]: plt.plot(x.numpy(), y.squeeze().numpy())