From: Joerg L. <jo...@us...> - 2004-06-15 07:36:56
|
Hi, On 14.06.04, Gary wrote: > How can I suppress the printing of labels without turning off ticks or grids? In order to suppress the labels you just have to set labelattrs to None in the axis painter. However, PyX currently isn't able to find a valid axis partitioning, at least in the example given below. To decide whether this is a bug or a feature, I'll leave up to you. Anyway, we can just specify a partitioning manually, as shown in the example. Jörg #!/usr/bin/env python from pyx import * from pyx.graph import axis gridpainter = axis.painter.regular(gridattrs=[style.linewidth.thin], labelattrs=None) g = graph.graphxy(width=10, x=axis.linear(min=0, max=7, painter=gridpainter, parter=axis.parter.linear(0.5)), y=axis.linear(painter=gridpainter, parter=axis.parter.linear(0.5))) g.plot(graph.data.function("y=sin(x)")) g.writeEPSfile("test") |