Vertical help lines only in tiKz












9















The following tiKz code gives you a 100x10 grid of help lines.



draw [help lines, dashed] (0,0) grid(100,10);


What is the code if you just want the 100 vertical helplines but not the 10 horizontal ones?










share|improve this question























  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.

    – Martin Schröder
    Mar 5 '15 at 12:39
















9















The following tiKz code gives you a 100x10 grid of help lines.



draw [help lines, dashed] (0,0) grid(100,10);


What is the code if you just want the 100 vertical helplines but not the 10 horizontal ones?










share|improve this question























  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.

    – Martin Schröder
    Mar 5 '15 at 12:39














9












9








9








The following tiKz code gives you a 100x10 grid of help lines.



draw [help lines, dashed] (0,0) grid(100,10);


What is the code if you just want the 100 vertical helplines but not the 10 horizontal ones?










share|improve this question














The following tiKz code gives you a 100x10 grid of help lines.



draw [help lines, dashed] (0,0) grid(100,10);


What is the code if you just want the 100 vertical helplines but not the 10 horizontal ones?







tikz-pgf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 5 '15 at 12:31









iank131iank131

486




486













  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.

    – Martin Schröder
    Mar 5 '15 at 12:39



















  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.

    – Martin Schröder
    Mar 5 '15 at 12:39

















Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.

– Martin Schröder
Mar 5 '15 at 12:39





Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.

– Martin Schröder
Mar 5 '15 at 12:39










2 Answers
2






active

oldest

votes


















10














You can use ystep to fix the number of horizontal lines. For example, if you use ystep=10 with a 10 X 10 grid:



documentclass{article}

usepackage{tikz}

begin{document}

begin{tikzpicture}
draw [help lines, dashed,ystep=10] (0,0) grid(10,10);
end{tikzpicture}

end{document}


you get



enter image description here



And there is always brute force:



documentclass{article}

usepackage{tikz}

begin{document}

begin{tikzpicture}
foreach x in {0,...,9}{
draw [help lines, dashed] (x,0) -- (x,10);
}
end{tikzpicture}

end{document}


enter image description here






share|improve this answer


























  • In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

    – iank131
    Mar 5 '15 at 13:10



















0














Since version 3.1 of TikZ you can use ysetp=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xsetp=0.



documentclass[tikz,border=7pt]{standalone}
begin{document}
begin{tikzpicture}
draw[help lines, dashed] (0,0) grid[ystep=0] (10,10);
end{tikzpicture}
end{document}


enter image description here





share























    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%2f231481%2fvertical-help-lines-only-in-tikz%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    10














    You can use ystep to fix the number of horizontal lines. For example, if you use ystep=10 with a 10 X 10 grid:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    draw [help lines, dashed,ystep=10] (0,0) grid(10,10);
    end{tikzpicture}

    end{document}


    you get



    enter image description here



    And there is always brute force:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    foreach x in {0,...,9}{
    draw [help lines, dashed] (x,0) -- (x,10);
    }
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer


























    • In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

      – iank131
      Mar 5 '15 at 13:10
















    10














    You can use ystep to fix the number of horizontal lines. For example, if you use ystep=10 with a 10 X 10 grid:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    draw [help lines, dashed,ystep=10] (0,0) grid(10,10);
    end{tikzpicture}

    end{document}


    you get



    enter image description here



    And there is always brute force:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    foreach x in {0,...,9}{
    draw [help lines, dashed] (x,0) -- (x,10);
    }
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer


























    • In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

      – iank131
      Mar 5 '15 at 13:10














    10












    10








    10







    You can use ystep to fix the number of horizontal lines. For example, if you use ystep=10 with a 10 X 10 grid:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    draw [help lines, dashed,ystep=10] (0,0) grid(10,10);
    end{tikzpicture}

    end{document}


    you get



    enter image description here



    And there is always brute force:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    foreach x in {0,...,9}{
    draw [help lines, dashed] (x,0) -- (x,10);
    }
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer















    You can use ystep to fix the number of horizontal lines. For example, if you use ystep=10 with a 10 X 10 grid:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    draw [help lines, dashed,ystep=10] (0,0) grid(10,10);
    end{tikzpicture}

    end{document}


    you get



    enter image description here



    And there is always brute force:



    documentclass{article}

    usepackage{tikz}

    begin{document}

    begin{tikzpicture}
    foreach x in {0,...,9}{
    draw [help lines, dashed] (x,0) -- (x,10);
    }
    end{tikzpicture}

    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 5 '15 at 12:42

























    answered Mar 5 '15 at 12:36







    user11232




















    • In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

      – iank131
      Mar 5 '15 at 13:10



















    • In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

      – iank131
      Mar 5 '15 at 13:10

















    In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

    – iank131
    Mar 5 '15 at 13:10





    In the first answer, you can hide the bottom horizontal line but not the top with the code: begin{tikzpicture} draw [help lines, dashed,ystep=10] (0,1) grid(10,10); end{tikzpicture} The second answer works.

    – iank131
    Mar 5 '15 at 13:10











    0














    Since version 3.1 of TikZ you can use ysetp=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xsetp=0.



    documentclass[tikz,border=7pt]{standalone}
    begin{document}
    begin{tikzpicture}
    draw[help lines, dashed] (0,0) grid[ystep=0] (10,10);
    end{tikzpicture}
    end{document}


    enter image description here





    share




























      0














      Since version 3.1 of TikZ you can use ysetp=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xsetp=0.



      documentclass[tikz,border=7pt]{standalone}
      begin{document}
      begin{tikzpicture}
      draw[help lines, dashed] (0,0) grid[ystep=0] (10,10);
      end{tikzpicture}
      end{document}


      enter image description here





      share


























        0












        0








        0







        Since version 3.1 of TikZ you can use ysetp=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xsetp=0.



        documentclass[tikz,border=7pt]{standalone}
        begin{document}
        begin{tikzpicture}
        draw[help lines, dashed] (0,0) grid[ystep=0] (10,10);
        end{tikzpicture}
        end{document}


        enter image description here





        share













        Since version 3.1 of TikZ you can use ysetp=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xsetp=0.



        documentclass[tikz,border=7pt]{standalone}
        begin{document}
        begin{tikzpicture}
        draw[help lines, dashed] (0,0) grid[ystep=0] (10,10);
        end{tikzpicture}
        end{document}


        enter image description here






        share











        share


        share










        answered 2 mins ago









        KpymKpym

        15.8k23986




        15.8k23986






























            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%2f231481%2fvertical-help-lines-only-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

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks