pyx-project / pyx

Repository of PyX, a Python package for the creation of PostScript, PDF, and SVG files.
https://pyx-project.org/
GNU General Public License v2.0
109 stars 18 forks source link

Misplaced ticklabel (wrong height) #32

Closed VincentDemery closed 3 years ago

VincentDemery commented 3 years ago

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 :

wobsta commented 3 years ago

This issue is related to recent versions of TeXlive and has been fixed in 8d561b02e55008e4ad50ea7bdd247a1c9a58b2ee.