I would like to reduce space between legend columns (An example is shown in the attached image). So, what I want to do is,
[before]
(Sym.)A ------ (Sym.)B ------ (Sym.)C ------ (Sym.)D
[after]
(Sym.)A -- (Sym.)B -- (Sym.)C -- (Sym.)D
Is there a way to do it?
(e.g., plt.legend(ncol=4, [a hidden parameter??])
)
Thanks!
Image of the current output:
CodePudding user response:
Take a look at the description of columnspacing
from documentation. You can try:
plt.legend(ncol=4, columnspacing=0.8)