How to use function `calc`

in TikZ?

For example, suppose I have a function `f(x)=x^2`

.

Now, I want to find `f(1)`

and f`(2)`

, and

then I want `\draw f(1) -- f(2);`

.

Skip to content
# [Tex/LaTex] Using calc in TikZ

tikz-pgf

How to use function `calc`

in TikZ?

For example, suppose I have a function `f(x)=x^2`

.

Now, I want to find `f(1)`

and f`(2)`

, and

then I want `\draw f(1) -- f(2);`

.

## Best Answer

A possibility with pgf 2.1