Vertical help lines only in TikZ
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
add a comment |
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
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
add a comment |
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
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
tikz-pgf
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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
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}
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
add a comment |
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}
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 thexstep
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
|
show 2 more comments
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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}
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
add a comment |
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
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}
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
add a comment |
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
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}
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
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}
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
add a comment |
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
add a comment |
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}
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 thexstep
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
|
show 2 more comments
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}
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 thexstep
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
|
show 2 more comments
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}
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}
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 thexstep
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
|
show 2 more comments
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 thexstep
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
|
show 2 more comments
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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