In tikz, is there any way for a decelared function to return a coordinate? What I want to do is something like this:

        {\fill test(2) circle [radius=1pt];};%

But it gives me a lot of incomprehensible errors.


closed as unclear what you're asking by Torbjørn T., Stefan Pinnow, Zarko, Kurt, Svend Tveskæg Apr 19 '16 at 19:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    what kind of coordinate ? A syntax or actual two output function? Notice that in TikZ there are no coordinates only references and their x,y values. You can forexample do something like \begin{tikzpicture} \def\testCommand#1{\fill (#1,#1) circle [radius=1pt];} \testCommand{1} \testCommand{3} \end{tikzpicture} instead. – percusse Feb 15 '16 at 13:11
  • 1
    Welcome! A complete minimal example which we can compile (or try to compile) would likely give us more sense of what you are trying to do and make it easier to help you. – cfr Feb 15 '16 at 23:12

Browse other questions tagged or ask your own question.