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.

Suppose I have a function f:A ->A. I can plot this function in a cartesian coordinate system in tikz/pgf. Can someone explain to me how to plot for a specific point a in A and a natural number m the m-time preimage of a (meaning the point in A, that evaluates to a, if f is m times applied) ?

Is it also possible to plot the preimage of an entire subset, that consists of more than a single point, of A ?

share|improve this question
2  
Can you please give a concrete example of what you want to achive, the function etc... In general TeX is a Turing complete machine and given infinite patience and skills anything is possible, perhaps not through tikz. –  Yiannis Lazarides Apr 1 '12 at 12:47
1  
Depends on the function itself. If it is possible to be expressed as an admissible function in TikZ/PGF or better pgfplots then it might be possible through nested foreach loops. –  percusse Apr 1 '12 at 13:49
    
@YiannisLazarides For example any linear function ax+b would interest me. –  user10324 Apr 1 '12 at 16:07
add comment

1 Answer

TikZ/pfg won't do this for you; it is not a computer algebra system. Given f and m, you need to compute the proper pre-image yourself. Then, of course, TikZ/pgf can plot the points you specify.

share|improve this answer
    
Couldn't perhaps gnuplot be used in combination with tikz ? I think I remember seeing somewhere a piece of code, where some function was actually computed in gnuplot and the plottet with tikz. –  user10324 Apr 1 '12 at 16:09
    
Probably. I wasn't thinking in those terms in my answer. I'll update my answer if I get time to think about how to send the parameter m to gnuplot. –  GregH Apr 3 '12 at 12:32
    
Since some time has passed, I'm curious if you managed to come up with something... –  user10324 Jul 14 '12 at 14:13
add comment

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.