import numpy
import matplotlib.pyplot as plt

fig_convergence = plt.figure(1,figsize=(12,6))

x = numpy.loadtxt('log_deepAI_paper_nonlin_action_long.txt')

plt.subplot(122)
plt.plot(x[:,0])
plt.xlim([0,500])
plt.ylim([-10,200])
plt.xlabel('Steps')
plt.ylabel('Free Action')
plt.axvline(x=230.0,linestyle=':')
plt.axvline(x=250.0,linestyle=':')
plt.axvline(x=270.0,linestyle=':')

ax = plt.subplot(121)
plt.plot(x[:,0])
plt.ylim([-10,200])
ax.axvspan(0, 500, alpha=0.3, color='red')
plt.xlim([0,30000])
plt.xlabel('Steps')
plt.ylabel('Free Action')

fig_convergence.subplots_adjust(left=0.07, bottom=0.1, right=0.95, top=0.95,
                    wspace=0.2, hspace=0.15)
                    
fig_convergence.savefig('fig_convergence.pdf')
                    
plt.show()

[((64, 94), 'matplotlib.pyplot.figure', 'plt.figure', (['(1)'], {'figsize': '(12, 6)'}), '(1, figsize=(12, 6))\n', (74, 94), True, 'import matplotlib.pyplot as plt\n'), ((98, 154), 'numpy.loadtxt', 'numpy.loadtxt', (['"""log_deepAI_paper_nonlin_action_long.txt"""'], {}), "('log_deepAI_paper_nonlin_action_long.txt')\n", (111, 154), False, 'import numpy\n'), ((156, 172), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(122)'], {}), '(122)\n', (167, 172), True, 'import matplotlib.pyplot as plt\n'), ((173, 192), 'matplotlib.pyplot.plot', 'plt.plot', (['x[:, (0)]'], {}), '(x[:, (0)])\n', (181, 192), True, 'import matplotlib.pyplot as plt\n'), ((190, 208), 'matplotlib.pyplot.xlim', 'plt.xlim', (['[0, 500]'], {}), '([0, 500])\n', (198, 208), True, 'import matplotlib.pyplot as plt\n'), ((208, 228), 'matplotlib.pyplot.ylim', 'plt.ylim', (['[-10, 200]'], {}), '([-10, 200])\n', (216, 228), True, 'import matplotlib.pyplot as plt\n'), ((228, 247), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""Steps"""'], {}), "('Steps')\n", (238, 247), True, 'import matplotlib.pyplot as plt\n'), ((248, 273), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""Free Action"""'], {}), "('Free Action')\n", (258, 273), True, 'import matplotlib.pyplot as plt\n'), ((274, 309), 'matplotlib.pyplot.axvline', 'plt.axvline', ([], {'x': '(230.0)', 'linestyle': '""":"""'}), "(x=230.0, linestyle=':')\n", (285, 309), True, 'import matplotlib.pyplot as plt\n'), ((309, 344), 'matplotlib.pyplot.axvline', 'plt.axvline', ([], {'x': '(250.0)', 'linestyle': '""":"""'}), "(x=250.0, linestyle=':')\n", (320, 344), True, 'import matplotlib.pyplot as plt\n'), ((344, 379), 'matplotlib.pyplot.axvline', 'plt.axvline', ([], {'x': '(270.0)', 'linestyle': '""":"""'}), "(x=270.0, linestyle=':')\n", (355, 379), True, 'import matplotlib.pyplot as plt\n'), ((385, 401), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(121)'], {}), '(121)\n', (396, 401), True, 'import matplotlib.pyplot as plt\n'), ((402, 421), 'matplotlib.pyplot.plot', 'plt.plot', (['x[:, (0)]'], {}), '(x[:, (0)])\n', (410, 421), True, 'import matplotlib.pyplot as plt\n'), ((419, 439), 'matplotlib.pyplot.ylim', 'plt.ylim', (['[-10, 200]'], {}), '([-10, 200])\n', (427, 439), True, 'import matplotlib.pyplot as plt\n'), ((482, 502), 'matplotlib.pyplot.xlim', 'plt.xlim', (['[0, 30000]'], {}), '([0, 30000])\n', (490, 502), True, 'import matplotlib.pyplot as plt\n'), ((502, 521), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""Steps"""'], {}), "('Steps')\n", (512, 521), True, 'import matplotlib.pyplot as plt\n'), ((522, 547), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""Free Action"""'], {}), "('Free Action')\n", (532, 547), True, 'import matplotlib.pyplot as plt\n'), ((760, 770), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (768, 770), True, 'import matplotlib.pyplot as plt\n')]