2

I'm using TeXLive, compile with XeTeX. Trying to draw some curves. These are done well with tkz-fct, but when I need an inverted function, I experienced some strangenesses.

1; For \tkzFctPar the id command parameter makes no sense. The filename is main.tkzparfct.gnuplot, for any sake. I have to solve it manually - tiring.

2; The domain, when no given, returns a very strange curve. When given, the curve ends in a wrong point.

\documentclass{article}
\usepackage{tkz-fct}
\usepackage{subcaption}

\begin{document}
\begin{figure}
\begin{subfigure}{.4500\textwidth}
    \begin{tikzpicture}
        \tkzInit[xmin=-2.5,xmax=2,ymin=-2.5,ymax=2,]
        \tkzAxeXY
        \tkzFct[id=circleArmyAbove,domain=-2:2]{sqrt(4-x**2)}
        \draw plot [smooth] file {main.circleArmyAbove.table};
    \end{tikzpicture}
\end{subfigure}\hfill
\begin{subfigure}{.4500\textwidth}
    \begin{tikzpicture}
        \tkzInit[xmin=-2.5,xmax=2,ymin=-2.5,ymax=2,]
        \tkzAxeXY
        \tkzFct[id=circleArmyBelow,domain=-2:2]{-sqrt(4-x**2)}
        \draw plot [smooth] file {main.circleArmyBelow.table};
    \end{tikzpicture}
\end{subfigure}
\begin{subfigure}{.4500\textwidth}
    \begin{tikzpicture}
        \tkzInit[xmin=-2.5,xmax=2,ymin=-2.5,ymax=2,]
        \tkzAxeXY
        \tkzFctPar[id=circleArmyRight]{sqrt(4-t**2)}{t}
        \draw plot [smooth] file {main.circleArmyRight.table};
    \end{tikzpicture}
\end{subfigure}\hfill
\begin{subfigure}{.4500\textwidth}
    \begin{tikzpicture}
        \tkzInit[xmin=-2.5,xmax=2,ymin=-2.5,ymax=2,]
        \tkzAxeXY
        \tkzFctPar[id=circleArmyLeft]{-sqrt(4-t**2)}{t}
        \draw plot [smooth] file {main.circleArmyLeft.table};
    \end{tikzpicture}
\end{subfigure}
\caption{Four curves}\label{fig:2.7}
\end{figure}

\end{document}

The first two figures are okay, the second two are the problematic ones.

Reading the manual makes complication because it is written in french, what I don't understand.

  • Package pgf Warning: Plot data file `benko.circleArmyAbove.table' not found. – egreg Jan 04 '20 at 22:38
  • 1
    @egreg Probably because you called your main file benko.tex. The OP probably called theirs main.tex, but it makes IMHO more sense to use\draw plot [smooth] file {\jobname.circleArmyRight.table};` and so on but I do not think that is the intended usage either. –  Jan 04 '20 at 23:47
  • If you replace all the \draw plot ... commands by \draw plot [smooth] file {\jobname.tkzparfct.table}; you produce the plots. I doubt this is the intended usage, though. You do not have to add any \draw plot ... to get the curves. That is, I do not understand the question. –  Jan 04 '20 at 23:50
  • @Schrödinger'scat: I need TWO gnuplot file, but it produses ONE. The idea that the id= parameter creates main..gnuplot file, as it does for the \tkzFct command, but it doesn't do. – Thomas Benko Jan 05 '20 at 14:00
  • Please explain your question. Why do you want two gnuplot files. Please make an effort of explaining what you want to achieve in detail. At the moment there are only some complaints but no information (that I can understand) whatsoever what you want to achieve, and how you try to achieve it, and why you chose the path. There is also no information (that I can understand) on the desired outcome. –  Jan 05 '20 at 14:53
  • How I tried is written. I need these four curve for an example of a differential equations solution. – Thomas Benko Jan 14 '20 at 21:00

0 Answers0