我在python的PyX中有plot
g = graph.graphxy(width=8,
x=graph.axis.log(min=1e-1, max=1e4, title=r"$x$-axis"),
y=graph.axis.lin(max=5, title=r"$y$-axis"))
g.plot(graph.data.function("y(x)=tan(log(1/x))**2"))
g.writeEPSfile("axis")
如何将背景色由透明变为白色?
发布于 2018-06-10 03:29:24
当设置了背景数据时,将绘制图形的背景。为了填充背景,您需要填充的装饰器,并将颜色作为attr或background order (应用于所有装饰器)传递给填充的装饰器。因此
g = graph.graphxy(width=8, backgroundattrs=[deco.filled([color.gray.white])],
x=graph.axis.log(min=1e-1, max=1e4, title=r"$x$-axis"),
y=graph.axis.lin(max=5, title=r"$y$-axis"))
g.plot(graph.data.function("y(x)=tan(log(1/x))**2"))
g.writeEPSfile("axis")
https://stackoverflow.com/questions/50763326
复制相似问题