import matplotlib.pyplot as plt
import numpy as np


fig = plt.figure()
ax = fig.add_subplot(111)
y = np.asarray([-10, 10]) * 2.**16/20.
ax.plot([-10, 10], y, color='dodgerblue', lw=1.5)
ax.set_xlabel('Measured voltage [V]')
ax.set_ylabel('Digitized value')
ax.set_xlim([-10.05, 10.05])
ax.set_ylim([-2**15, 2**15-1])
ax.set_yticks([-2**15, -2**14, 0, 2**14, 2**15-1])
ax.spines["right"].set_visible(False)
ax.spines["top"].set_visible(False)
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')
ax.xaxis.linewidth=2
ax.yaxis.linewidth=2
ax.tick_params(direction="out", width=1.25)
ax.tick_params(direction="out", width=1.25)
ax.grid()
fig.set_facecolor("white")
fig.set_size_inches(4., 3.6)
fig.tight_layout()
fig.savefig("data_acquisition.pdf")

plt.close()
