Is it possible to define new functions in tkz-fct and use them to plot using \tkzFct?

  • Sorry but my english is not very fine, you want define new functions or new macros ? If you want new mathematic functions, you need to create them like with tikz. In the cvs version of Tikz I create some new functions for arithmetics integers. If you can complete your question, I give you a more complete answer. May 24, 2011 at 17:56
  • Yes I want new mathematical functions
    – student
    May 24, 2011 at 18:21
  • What kind of functions ? May 24, 2011 at 21:11

2 Answers 2


You can define new functions using \pgfmathdeclarefunction. For example, the following defines a gaussian function that can be used in TikZ:



\draw [help lines] (-2,0) grid [step=0.5] (2,1);
\draw plot [domain=-2:2,samples=40] (\x,{gauss(\x,0,0.5)});

gaussian function


You need to read the pgfmanual. 66 Customizing the Mathematical Engine

You can also read the code of pgf . For example, I contribute for pgfmathfunctions.integerarithmetics.code.tex and the code is not very complex .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.