I have the following code in Python for plotting a simple graph:
import numpy as np
import matplotlib.pyplot as plt
for i in (2, 3, 4, 5, 6):
plt.plot(i, 2*i, linewidth = 3, label='$n = {i}$'.format(i=i))
plt.legend(loc='upper left')
plt.show()
When I execute it shows the window with the legend, but not the graph line. If I use plt.scatter() instead it plots the points normally. I was reading that it maybe an issue of the backend, but my matlibrc folder is empty and I don't have any config file there. Anyone with similar experience? Any ideas of the problem?