swharden / pyABF

pyABF is a Python package for reading electrophysiology data from Axon Binary Format (ABF) files

Home Page:https://swharden.com/pyabf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

overlapping AP and dV plots

swharden opened this issue · comments

This looks cool. Add a graph like this to the demo plots

image

Done in fd96725:

abf = pyabf.ABF(PATH_DATA+"/17o05028_ic_steps.abf")

plt.figure(figsize = (4, 4))

ax1 = plt.gca()
ax1.plot(abf.sweepX, abf.sweepY, color='k')
ax1.axis([2.714, 2.722, -60, 60])
ax1.set_ylabel("mV", fontsize = 18)

ax2 = plt.gca().twinx()
msPerSecond = 1000
ax2.plot(abf.sweepX, abf.sweepDerivative / msPerSecond, color='b')
ax2.set_ylabel("mV/ms", fontsize = 18, color = "b")

plt.tight_layout()
plt.show()

Figure_1