|
From: Michael H. <mi...@sp...> - 2015-10-15 20:19:54
|
Hello,
I think I found a bug in the texter subsystem. The rational class doesn't
handle skipdenom=True correctly when denomsuffix is set.
I have a small example:
from pyx import *
texter = graph.axis.texter.rational(denomsuffix=r"\pi", skip1=True,
skipdenom1=True)
g = graph.graphxy(
width = 8,
x = graph.axis.lin(min=0, max=1),
y = graph.axis.lin(texter=texter, min=0, max=1)
)
g.writePDFfile()
The label of the upmost tick is "1/1pi" instead of "1/pi". According to the
documentation the "1" in the denominator should be omitted.
The bug is in the file pyx/graph/axis/texter.py, method labels, starting at
line 389. Unfortuntely, I didn't fully understand the logic of the code, so I
cannot send you a patch. I've used the latest PyX release 0.14 and Python
3.4.2.
Thank you very much for your help!
Kind regards,
--Michael
|