Vertical help lines only in TikZ












10















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
















10















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














10












10








10








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








edited Jan 12 at 15:42









Zarko

122k865160




122k865160










asked Mar 5 '15 at 12:31









iank131iank131

537




537













  • 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


















11














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



















3














Since version 3.1 of TikZ you can use ystep=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xstep=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|improve this answer


























  • The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

    – AndréC
    Jan 12 at 8:33






  • 1





    @AndréC check the xstep key on page 157.

    – Kpym
    Jan 12 at 9:29











  • Thank you, where can you find this modification in the changelog or on the TikZ repository?

    – AndréC
    Jan 12 at 9:32






  • 1





    @AndréC exactly, this is not a bug but a feature ticket.

    – Kpym
    Jan 12 at 9:54








  • 1





    @AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

    – Kpym
    Jan 12 at 10:44













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









11














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
















11














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














11












11








11







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











3














Since version 3.1 of TikZ you can use ystep=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xstep=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|improve this answer


























  • The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

    – AndréC
    Jan 12 at 8:33






  • 1





    @AndréC check the xstep key on page 157.

    – Kpym
    Jan 12 at 9:29











  • Thank you, where can you find this modification in the changelog or on the TikZ repository?

    – AndréC
    Jan 12 at 9:32






  • 1





    @AndréC exactly, this is not a bug but a feature ticket.

    – Kpym
    Jan 12 at 9:54








  • 1





    @AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

    – Kpym
    Jan 12 at 10:44


















3














Since version 3.1 of TikZ you can use ystep=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xstep=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|improve this answer


























  • The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

    – AndréC
    Jan 12 at 8:33






  • 1





    @AndréC check the xstep key on page 157.

    – Kpym
    Jan 12 at 9:29











  • Thank you, where can you find this modification in the changelog or on the TikZ repository?

    – AndréC
    Jan 12 at 9:32






  • 1





    @AndréC exactly, this is not a bug but a feature ticket.

    – Kpym
    Jan 12 at 9:54








  • 1





    @AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

    – Kpym
    Jan 12 at 10:44
















3












3








3







Since version 3.1 of TikZ you can use ystep=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xstep=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|improve this answer















Since version 3.1 of TikZ you can use ystep=0 (or negative) to skip the vertical lines. And same for the horizontal lines with xstep=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|improve this answer














share|improve this answer



share|improve this answer








edited Jan 12 at 13:04

























answered Jan 12 at 7:53









KpymKpym

16k23986




16k23986













  • The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

    – AndréC
    Jan 12 at 8:33






  • 1





    @AndréC check the xstep key on page 157.

    – Kpym
    Jan 12 at 9:29











  • Thank you, where can you find this modification in the changelog or on the TikZ repository?

    – AndréC
    Jan 12 at 9:32






  • 1





    @AndréC exactly, this is not a bug but a feature ticket.

    – Kpym
    Jan 12 at 9:54








  • 1





    @AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

    – Kpym
    Jan 12 at 10:44





















  • The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

    – AndréC
    Jan 12 at 8:33






  • 1





    @AndréC check the xstep key on page 157.

    – Kpym
    Jan 12 at 9:29











  • Thank you, where can you find this modification in the changelog or on the TikZ repository?

    – AndréC
    Jan 12 at 9:32






  • 1





    @AndréC exactly, this is not a bug but a feature ticket.

    – Kpym
    Jan 12 at 9:54








  • 1





    @AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

    – Kpym
    Jan 12 at 10:44



















The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

– AndréC
Jan 12 at 8:33





The documentation in manual 3.1 does not mention this. Where can I find documentation on this subject?

– AndréC
Jan 12 at 8:33




1




1





@AndréC check the xstep key on page 157.

– Kpym
Jan 12 at 9:29





@AndréC check the xstep key on page 157.

– Kpym
Jan 12 at 9:29













Thank you, where can you find this modification in the changelog or on the TikZ repository?

– AndréC
Jan 12 at 9:32





Thank you, where can you find this modification in the changelog or on the TikZ repository?

– AndréC
Jan 12 at 9:32




1




1





@AndréC exactly, this is not a bug but a feature ticket.

– Kpym
Jan 12 at 9:54







@AndréC exactly, this is not a bug but a feature ticket.

– Kpym
Jan 12 at 9:54






1




1





@AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

– Kpym
Jan 12 at 10:44







@AndréC well the "bug" was the "bad" behavior of TikZ for zero or negative steps (I use quotation marks because this is subjective). And the final coordinate was not set as expected.

– Kpym
Jan 12 at 10:44




















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

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?