0

I tried to draw an area under a function, but it results a strange shape.

\documentclass{article}
\usepackage{tkz-fct}
\begin{document}
\begin{tikzpicture}[scale=.7071]
\tkzInit[xmin=0,xmax=5,ymin=0,ymax=5]
\tkzGrid[color=white]
\tkzDrawX[label=$\Delta t$,noticks]
\tkzDrawY[label=$\Delta s$,noticks]
\tkzFct[domain=0:5,samples=100,id=vt]{2}
\tkzDrawArea[domain=1:4]
\end{tikzpicture}
\end{document}

The result is: failed area

I thought of a rectangle shape. Tried the solution given in question problem with surfaces on tkz-fct , but the problem still exists. My tkz-fct version is 1.4c by the .sty header

muzimuzhi Z
  • 26,474
  • I cannot reproduce your problem with latest texlive 2021 and gnuplot on PATH, and compiled with -shell-escape. Also tested on overleaf's texlive 2021, and the output is ok too. – muzimuzhi Z Nov 30 '21 at 02:23
  • That's strange, I use the latest update of TL. With the second code in the mentioned question I was able to fill the selected area, but the function's domain is overwritten. Better, but still not acceptable... – Thomas Benko Nov 30 '21 at 09:26
  • You could add \listfiles to preamble, run, and paste the version info from end of .log to the question. So I can see if versions of any included files are different. – muzimuzhi Z Nov 30 '21 at 10:28
  • tkz-fct.sty 2020/05/01 1.4c function – Thomas Benko Dec 03 '21 at 08:51
  • More strange: I compiled it again, and I've got the correct shape filled. But the functions graph is drawed only inside the shapes interval. The functions domain is overwritten by \tkzDrawArea, when I reset it by hand, I got the picture above again. – Thomas Benko Dec 03 '21 at 08:57
  • Edit question and paste the whole version info, not restricted to tkz-fct? Also can you run your example on overleaf, download the output PDF, then open and check it shown as expected? – muzimuzhi Z Dec 03 '21 at 09:59

0 Answers0