Adding text to a node in Tikz












1















Based on the answer in TikZ Adding Text, I tried the below example to display the coordinates as text in the Tikz figure. But the code is not compilable.



How do I add text to a coordinate in tikz without using the node command.



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw[thick,rounded corners=8pt] (0,0) {0,0} -- (0,2) {0,2};
end{tikzpicture}
end{document}


After the suggestion from @JouleV, I have the following:



enter image description here



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw (-5,0) node {-5,0} -- (5,0) node {5,0};
draw (0,-5) node {0,-5} -- (0,5) node {0,5};
draw (0,0) circle [radius=3cm];
end{tikzpicture}
end{document}


How to ensure that there is enough space between the text and lines?










share|improve this question

























  • draw (0,0) node {0,0}--(0,2) node {0,2};. Have a look at this.

    – JouleV
    2 hours ago













  • @JouleV thanks. It works. but now there is no enough space between the text and the lines. How do I introduce the space.

    – subham soni
    2 hours ago
















1















Based on the answer in TikZ Adding Text, I tried the below example to display the coordinates as text in the Tikz figure. But the code is not compilable.



How do I add text to a coordinate in tikz without using the node command.



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw[thick,rounded corners=8pt] (0,0) {0,0} -- (0,2) {0,2};
end{tikzpicture}
end{document}


After the suggestion from @JouleV, I have the following:



enter image description here



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw (-5,0) node {-5,0} -- (5,0) node {5,0};
draw (0,-5) node {0,-5} -- (0,5) node {0,5};
draw (0,0) circle [radius=3cm];
end{tikzpicture}
end{document}


How to ensure that there is enough space between the text and lines?










share|improve this question

























  • draw (0,0) node {0,0}--(0,2) node {0,2};. Have a look at this.

    – JouleV
    2 hours ago













  • @JouleV thanks. It works. but now there is no enough space between the text and the lines. How do I introduce the space.

    – subham soni
    2 hours ago














1












1








1








Based on the answer in TikZ Adding Text, I tried the below example to display the coordinates as text in the Tikz figure. But the code is not compilable.



How do I add text to a coordinate in tikz without using the node command.



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw[thick,rounded corners=8pt] (0,0) {0,0} -- (0,2) {0,2};
end{tikzpicture}
end{document}


After the suggestion from @JouleV, I have the following:



enter image description here



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw (-5,0) node {-5,0} -- (5,0) node {5,0};
draw (0,-5) node {0,-5} -- (0,5) node {0,5};
draw (0,0) circle [radius=3cm];
end{tikzpicture}
end{document}


How to ensure that there is enough space between the text and lines?










share|improve this question
















Based on the answer in TikZ Adding Text, I tried the below example to display the coordinates as text in the Tikz figure. But the code is not compilable.



How do I add text to a coordinate in tikz without using the node command.



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw[thick,rounded corners=8pt] (0,0) {0,0} -- (0,2) {0,2};
end{tikzpicture}
end{document}


After the suggestion from @JouleV, I have the following:



enter image description here



documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw (-5,0) node {-5,0} -- (5,0) node {5,0};
draw (0,-5) node {0,-5} -- (0,5) node {0,5};
draw (0,0) circle [radius=3cm];
end{tikzpicture}
end{document}


How to ensure that there is enough space between the text and lines?







tikz-pgf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago







subham soni

















asked 2 hours ago









subham sonisubham soni

3,95882981




3,95882981













  • draw (0,0) node {0,0}--(0,2) node {0,2};. Have a look at this.

    – JouleV
    2 hours ago













  • @JouleV thanks. It works. but now there is no enough space between the text and the lines. How do I introduce the space.

    – subham soni
    2 hours ago



















  • draw (0,0) node {0,0}--(0,2) node {0,2};. Have a look at this.

    – JouleV
    2 hours ago













  • @JouleV thanks. It works. but now there is no enough space between the text and the lines. How do I introduce the space.

    – subham soni
    2 hours ago

















draw (0,0) node {0,0}--(0,2) node {0,2};. Have a look at this.

– JouleV
2 hours ago







draw (0,0) node {0,0}--(0,2) node {0,2};. Have a look at this.

– JouleV
2 hours ago















@JouleV thanks. It works. but now there is no enough space between the text and the lines. How do I introduce the space.

– subham soni
2 hours ago





@JouleV thanks. It works. but now there is no enough space between the text and the lines. How do I introduce the space.

– subham soni
2 hours ago










1 Answer
1






active

oldest

votes


















3














You just have to add some options to it.



documentclass[tikz,margin=3mm]{standalone}
begin{document}
begin{tikzpicture}
draw (0,-5) node[below] {$(0,-5)$}--(0,5) node[above] {$(0,5)$};
draw (-5,0) node[left] {$(-5,0)$}--(5,0) node[right] {$(5,0)$};
draw (0,0) circle (3cm);
end{tikzpicture}
end{document}


enter image description here



In fact you can add every possible option for node.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476264%2fadding-text-to-a-node-in-tikz%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    You just have to add some options to it.



    documentclass[tikz,margin=3mm]{standalone}
    begin{document}
    begin{tikzpicture}
    draw (0,-5) node[below] {$(0,-5)$}--(0,5) node[above] {$(0,5)$};
    draw (-5,0) node[left] {$(-5,0)$}--(5,0) node[right] {$(5,0)$};
    draw (0,0) circle (3cm);
    end{tikzpicture}
    end{document}


    enter image description here



    In fact you can add every possible option for node.






    share|improve this answer






























      3














      You just have to add some options to it.



      documentclass[tikz,margin=3mm]{standalone}
      begin{document}
      begin{tikzpicture}
      draw (0,-5) node[below] {$(0,-5)$}--(0,5) node[above] {$(0,5)$};
      draw (-5,0) node[left] {$(-5,0)$}--(5,0) node[right] {$(5,0)$};
      draw (0,0) circle (3cm);
      end{tikzpicture}
      end{document}


      enter image description here



      In fact you can add every possible option for node.






      share|improve this answer




























        3












        3








        3







        You just have to add some options to it.



        documentclass[tikz,margin=3mm]{standalone}
        begin{document}
        begin{tikzpicture}
        draw (0,-5) node[below] {$(0,-5)$}--(0,5) node[above] {$(0,5)$};
        draw (-5,0) node[left] {$(-5,0)$}--(5,0) node[right] {$(5,0)$};
        draw (0,0) circle (3cm);
        end{tikzpicture}
        end{document}


        enter image description here



        In fact you can add every possible option for node.






        share|improve this answer















        You just have to add some options to it.



        documentclass[tikz,margin=3mm]{standalone}
        begin{document}
        begin{tikzpicture}
        draw (0,-5) node[below] {$(0,-5)$}--(0,5) node[above] {$(0,5)$};
        draw (-5,0) node[left] {$(-5,0)$}--(5,0) node[right] {$(5,0)$};
        draw (0,0) circle (3cm);
        end{tikzpicture}
        end{document}


        enter image description here



        In fact you can add every possible option for node.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 27 mins ago

























        answered 2 hours ago









        JouleVJouleV

        4,0701938




        4,0701938






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476264%2fadding-text-to-a-node-in-tikz%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin