Python Pyx Plot:如何拆分图键?

Python Pyx Plot: How to split graph key?

考虑下面PyX plot

如何安排图形键,而不是一个包含 4 个条目的垂直列表,而是并排放置 2 个列表(每个 2 个条目)?

我的意思是,而不是键:

x = y^4,

x = y^2,

x = y,

y = x^4,

有钥匙:

x = y^4, x = y

x = y^2, y = x^4

代码如下:

from pyx import *
g = graph.graphxy(width=8,
              x=graph.axis.linear(min=0, max=2),
              y=graph.axis.linear(min=0, max=2),
              key=graph.key.key(pos="br", dist=0.1))
g.plot([graph.data.function("x(y)=y**4", title=r"$x = y^4$"),
    graph.data.function("x(y)=y**2", title=r"$x = y^2$"),
    graph.data.function("x(y)=y", title=r"$x = y$"),
    graph.data.function("y(x)=x**4", title=r"$y = x^4$")],
   [graph.style.line([color.gradient.Rainbow])])
g.writePDFfile("change")

graph.key 有一个参数 colums,它恰好是一个,可以设置为两个或您想要的任何其他值。 http://pyx.sourceforge.net/manual/graph.html#module-graph.key