<p>python中的主要绘图工具(与pandas一起工作)是matplotlib(旧的)和seaborn(新的和一个小爱好者)。你知道吗</p>
<p>查看seaborn的文档(<a href="https://seaborn.pydata.org/tutorial/axis_grids.html" rel="nofollow noreferrer">https://seaborn.pydata.org/tutorial/axis_grids.html</a>)和配方页(<a href="https://python-graph-gallery.com/122-multiple-lines-chart/" rel="nofollow noreferrer">https://python-graph-gallery.com/122-multiple-lines-chart/</a>)
对于多组分合成图,可以如下所示显示荧光数据:</p>
<pre><code># libraries
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Data
df=pd.DataFrame({'x': range(100),
'trace1': np.random.randn(100),
'trace2': np.random.randn(100)+10,
'trace3': np.random.randn(100)+20})
# multiple line plot
plt.plot( 'x', 'trace1', data=df, marker='', color='black', linewidth=2)
plt.plot( 'x', 'trace2', data=df, marker='', color='black', linewidth=2)
plt.plot( 'x', 'trace3', data=df, marker='', color='black', linewidth=2, label="GluK1c")
plt.legend()
</code></pre>
<p>我不喜欢那种<strong>黑客(给每个跟踪y值加上数字),因为应该有一种方法可以在<code>matplotlib</code>内偏移你的y轴值,但我在谷歌搜索时找不到这个选项。你知道吗</p>
<p>在这种情况下,因为你想要最简单的黑线痕迹(神经科学期刊所期望的),matplotlib和seaborn是可比的。你知道吗</p>
<p>有关大量图例位置/格式选项,请参见<a href="https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.legend.html" rel="nofollow noreferrer">https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.legend.html</a><a href="https://i.stack.imgur.com/rmwQo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rmwQo.png" alt="enter image description here"/></a></p>
<p>我真希望我在实验室工作的时候有这些工具。会比我那时做的好得多。你知道吗</p>