In the output of the following code, the height of the ticklabel "0" of the x-axis is strange.
import sys, os
from pyx import *
import numpy as np
text.set(engine=text.LatexEngine)
text.preamble(r"\usepackage{cmbright}")
w = 6
h = 6
c = canvas.canvas()
g = c.insert(graph.graphxy(height=h, width=w,
x=graph.axis.linear(min=0, max=5, title="$x$"),
y=graph.axis.linear(title="$y$")))
g.plot(graph.data.function("y(x)=cos(x)"),
[graph.style.line()])
c.writePDFfile()
I use PyX 0.15 on Archlinux, and my version of Python is 3.9.6.
This does not happen if :
I do not use Latex (although, zooming in a lot, a small shift seems to
remain),
OR I remove the min and max setting in graph.axis.linear, and put them in
data.function instead.
OR with some other values of the bounds, for instance 6 instead of 5.
OR I use PyX 0.14.1, replacing engine=text.LatexEngine by text.LatexRunner.
In the output of the following code, the height of the ticklabel "0" of the x-axis is strange.
I use PyX 0.15 on Archlinux, and my version of Python is 3.9.6.
This does not happen if :
graph.axis.linear
, and put them indata.function
instead.engine=text.LatexEngine
bytext.LatexRunner
.