Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there documentation for which functions work as pgfplots expressions (like sin, cos, exp, etc.) The pgfplots documentation doesn't seem to say anything on what you can/can't use.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The pgfplots package uses pgfmath expressions from the pgf package. See the TikZ/PGF manual (pgfmanual.pdf) in part VI, section 63 "Syntax for mathematical expressions", page 527 in PGF v2.10 for a list of all available PGF math expressions. You can also add your own, but some programming is required for that.

share|improve this answer
    
I'm not sure that pgfplots uses all the pgfmath functions of the pgf 2.1 version. I have the impression that pgfplots uses the functions of pgf 2.0 and I'm not sure that you can use in pgfplots a personal function created with pgfmathdeclarefunction. Perhaps I'm wrong but if you have an example I think a lot of users will be happy ! I have some difficulties with the english language but there is pgfplotstodo document somewhere ... –  Alain Matthes Apr 10 '11 at 9:24
    
@Altermundus: AFAIK pgfplots passes the math expressions to pgf in whatever version installed and uses the return value. This would allow for all available functions including self-defined ones. However, I didn't tested that by myself. –  Martin Scharrer Apr 10 '11 at 9:31
    
I sent an email to Christian Feuersaenger. I hope he has enough time to give an answer because my first tests are negative. –  Alain Matthes Apr 10 '11 at 9:36
    
PGFPlots uses the fpu library of pgf -- which is supposed to contain all math functions. But it might happen that some new functions need to be ported to the fpu. Can you send me an example? Perhaps I can improve some things. –  Christian Feuersänger Apr 18 '11 at 20:50
    
@Feuersaenger: I think you mean Altermundus, don't you? You need to add @Altermundus in your comment so that he gets notified. –  Martin Scharrer Apr 18 '11 at 20:55

Your Answer

 
discard

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.