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

I know three ways to do function plots based on the TikZ/pgf package:

Which of those options is the most powerful? Why? Can you give typical cases where one package is better/easier to use than the other?

share|improve this question

Well, I can't speak to the features of tkz-fct, but pgfplots is in every way superior to plain tikz. I am quite new at it, but here are the things I've already enjoyed:

  • It draws the axes automatically. You probably understand how wonderful that is: I don't have to worry about the range (which can change as I develop the picture); I don't have to worry about where to put the arrows; I don't have to worry about how much the axes will "overhang" into the quadrants I'm not using (e.g. if I draw a first-quadrant picture, how the tails of the axes will look as they cross the origin).

  • It has logical, "graph" coordinates that are independent of picture coordinates or page dimensions; these coordinates scale automatically to fit the picture and you can specify their extent, too! No more guessing how high to draw an asymptote!

  • The syntax for writing a function in algebraic notation is a little nicer: you can write x instead of \x.

  • You can filter coordinates: no more guessing how close to the asymptote to make the domain in order to get the picture to look decent! Also, no more splitting the domain around singularities.

This alone makes it my package of choice as a casual user: if I want to draw a random picture, it's as simple as

  \addplot f(x);

A ten-second job compared to the previous ten-minute job adjusting all these things myself.

share|improve this answer

I do not know what would constitute a power of a package, and what would make one more powerful then other, but it is my impression that tkz-fct package is aimed mainly to creating plots of the kind that you would find in a calculus textbook, while pgfplots excels at creating more of a "scientific" or "applied" plots, something you would use in an article about physics or biology.

share|improve this answer
Yes but pgfplots has a lot of possibilities that you can't find in tkz-fct. My package is only for calculus textbook. – Alain Matthes Jan 2 '12 at 19:44
Funny coincidence: I have just submitted my article to IEEE-TRO crawling with pgfplots stuff :) – percusse Jan 2 '12 at 19:58

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.