I have code:
import matplotlib.pyplot as plt
from configparser import ConfigParser
cfg = ConfigParser()
cfg.read('file.cfg')
plt.plot([1, 10],[2, 2], color_4, ls = "dashed")
plt.xlim(1,10)
plt.ylim(1,4)
plt.savefig('image.pdf')
and I would like control it by configuration file:
[a]
color_4 = c = 'silver'
What is wrong please? It gives an error:
NameError: name 'color_4' is not defined