使用seaborn 0.11,我想绘制一个seaborn ridge plot
我想在一个图中绘制磁谱数据。因此,y轴只统计图的数量,x轴使用数据。这是一个我期待的例子
这些是不同角度的光谱数据。有没有办法在python中绘制类似的内容?提前谢谢
import matplotlib.pyplot as plt
data = np.loadtxt("0_deg.txt", skiprows=0, dtype=np.float128)
fig, ax = plt.subplots(figsize=(8, 6))
ax.plot(data, markersize=1, label="0° ")
数据如下所示
269.09019 0.10781
269.09208 0.10908
269.09397 0.11928
269.09587 0.11800
269.09776 0.11418
269.09966 0.11545
269.10155 0.11928
269.10344 0.11673
269.10534 0.10781
269.10723 0.10526
269.10913 0.11418
269.11102 0.11418
269.11292 0.11291
269.11481 0.11928
269.11670 0.11928
269.11860 0.12055
269.12049 0.11928
269.12239 0.11928
269.12428 0.11673
269.12618 0.11545
269.12807 0.11545
269.12996 0.11036
269.13186 0.10908
269.13375 0.10144
269.13565 0.10908
269.13754 0.10654
269.13943 0.10399
269.14133 0.10526
269.14322 0.11418
269.14512 0.10908
269.14701 0.10272
269.14891 0.09889
269.15080 0.10526
269.15269 0.09889
269.15459 0.09635
269.15648 0.09889
269.15838 0.10017
269.16027 0.09507
269.16217 0.08998
269.16406 0.09507
269.16595 0.08870
269.16785 0.09252
269.16974 0.09762
269.17164 0.09889
269.17353 0.09507
269.17542 0.10017
269.17732 0.10399
269.17921 0.10144
269.18111 0.09762
269.18300 0.10144
269.18490 0.10144
269.18679 0.09635
269.18868 0.10017
269.19058 0.10399
269.19247 0.10017
269.19437 0.10017
269.19626 0.09889
269.19816 0.10017
269.20005 0.09507
269.20194 0.09635
269.20384 0.09380
269.20573 0.09252
269.20763 0.08998
Ridge Plot
.glob
查找目录中的所有文件pandas.DataFrames
的list
中-1
处的值作为每组数据的'label'
列值。这个值是0deg
、10deg
,等等。f = WindowsPath('data/CuSo4_10mV_300mS_Amod9.44V_0deg')
作为pathlib
对象f.suffix
是'.44V_0deg'
f.suffix.split('_')[-1]
是'0deg'
'label'
列,以便可以为每个打印线识别正确的'intensity'
值李>pandas.concat
组合数据帧列表李>更新前
相关问题 更多 >
编程相关推荐