TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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. – Alain Matthes May 24 '11 at 17:56
Yes I want new mathematical functions – student May 24 '11 at 18:21
What kind of functions ? – Alain Matthes May 24 '11 at 21:11

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

share|improve this answer

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 .

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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