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
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
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 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}
add a comment |
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 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}
add a comment |
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}
add a comment |
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}
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}
answered 2 mins ago
KpymKpym
15.8k23986
15.8k23986
add a comment |
add a comment |
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