对齐matplotlib子图例 [英] aligning matplotlib subplots legends
本文介绍了对齐matplotlib子图例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个子曲线,这些子曲线的曲线较少(见图).我希望第二个情节的图例与其他情节的高度相同.切换两个句柄的顺序不是一个有效的选项.
I have a few subplots for which one has less curves (see figure). I want the legend of the second plot to be at the same height as the others. Switching the order of the two handles is not a valid option.
谢谢大家!
推荐答案
经过多次试验,我加了一条虚拟曲线:
After a lot of trials, I added a dummy curve:
axarr[1].plot([], [], label=" ", c="w")
这篇关于对齐matplotlib子图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文