I'm trying to put a "pin in data" label in my figure (an osciloscope capture) but I get this error message

tex capacity exceeded sorry [input stack size=5000]

This is my MWE that compiles properly when removing the pin-in-data line indicated in the comment.



        %define custom "osciloscope axis"
        data visualization/our system/.style={
        new Cartesian axis=horizontal axis,
        new Cartesian axis=vertical axis,
        horizontal axis={unit vector={(1pt,0 cm)},length=6 cm},
        vertical axis={unit vector={(0cm,1pt)},length=5 cm},
        horizontal axis ={attribute=xpos, min value=-5, max value=5},
        vertical axis ={attribute=ypos, min value=-4, max value=4},
        horizontal axis= {visualize axis={vertical axis={goto=max},low=-5,high=5},
                        visualize axis={vertical axis={goto pos=0.5},low=-5,high=5},
                        visualize axis={vertical axis={goto=min},low=-5,high=5},
                        ticks={step=1, minor steps between steps=4}},
        vertical axis= {visualize axis={horizontal axis={goto=min},low=-4,high=4},
                      visualize axis={horizontal axis={goto pos=0.5},low=-4,high=4},
                      visualize axis={horizontal axis={goto=max},low=-4,high=4},
                      ticks={step=1, minor steps between steps=4}},
        all axes={grid={some}},
        vertical axis={visualize grid={direction axis=horizontal axis, common={style={black!90,dotted}}},
                    visualize ticks={direction axis=horizontal axis,low=-2,high=2pt,horizontal axis={goto=0}}},
        horizontal axis={visualize grid={direction axis=vertical axis, common={style={black!90,dotted}}},
                    visualize ticks={direction axis=vertical axis,low=-2,high=2pt,vertical axis={goto=0}}}

        \tikz \datavisualization [
        our system,
        all axes={grid=many},
        visualize as line=signal,
        %signal={pin in data={text=$My labels$,index=1,pin length= 5 ex, pin angle= 45}}, % this is the line that doesn't work
        style sheet= vary hue,% label in data
        data [set=signal] {
        xpos, ypos
        -4.966, 3.044
        4.946, 2.811


Thank you for helping, any advive would be apreciated!



I've just happened to discover what is wrong, but still don't know why it is wrong.

the line

    \tikz \datavisualization [

should be replaced by

    \datavisualization [

Could anyone explain or give a hint of the differences between them?

  • 1
    \tikz ... is a short form for \begin{tikzpicture} ... \end{tikzpicture}, so you're trying to start a new tikzpicture inside the existing one, causing trouble. – Torbjørn T. Dec 29 '15 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.