aligning matplotlib subplots legends

家住魔仙堡 提交于 2020-01-07 08:34:06

问题


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.

Thanks guys!


回答1:


After a lot of trials, I added a dummy curve:

axarr[1].plot([], [], label=" ", c="w")



来源:https://stackoverflow.com/questions/43833721/aligning-matplotlib-subplots-legends

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!