Plot a legend outside of the plotting area in base graphics?

前端 未结 10 857
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 14:48

As the title says: How can I plot a legend outside the plotting area when using base graphics?

I thought about fiddling around with layout

10条回答
  •  庸人自扰
    2020-11-22 15:45

    Try layout() which I have used for this in the past by simply creating an empty plot below, properly scaled at around 1/4 or so and placing the legend parts manually in it.

    There are some older questions here about legend() which should get you started.

提交回复
热议问题