How to draw this diagram/graph using tikz? Announcing the arrival of Valued Associate #679:...
What would you call this weird metallic apparatus that allows you to lift people?
How would a mousetrap for use in space work?
I can't update due to The repository 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04 ./ Release' is not signed
Plot data from external file with floating numbers
What to do with repeated rejections for phd position
How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?
How does the math work when buying airline miles?
What is best way to wire a ceiling receptacle in this situation?
How many morphisms from 1 to 1+1 can there be?
How much damage would a cupful of neutron star matter do to the Earth?
What produces gravitational waves with "periods between about 100 - 8000 seconds"?
How to write capital alpha?
Reason to add a name of the theme like ('menu-1' => __( 'Primary', 'twentynineteen' ),) in PHP?
In musical terms, what properties are varied by the human voice to produce different words / syllables?
What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?
What order were files/directories output in dir?
Tannaka duality for semisimple groups
Flight departed from the gate 5 min before scheduled departure time. Refund options
How often does castling occur in grandmaster games?
What does it mean that physics no longer uses mechanical models to describe phenomena?
Does any scripture mention that forms of God or Goddess are symbolic?
Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?
Why datecode is SO IMPORTANT to chip manufacturers?
A term for a woman complaining about things/begging in a cute/childish way
How to draw this diagram/graph using tikz?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How to draw stack diagram with TiKz?Cannot draw this diagram using tikz-cdHow to refine this tikz diagram?How to draw vertical spiral using TiKZ?How to draw this simple box diagram with TikzTikz: Better way to draw this simple diagramDraw diagram in TikZPhasor summation using tikzCan I draw this diagram in Tikz?How to draw/optimize this graph with tikz
I have this diagram, and I have tried to draw it doing every dot and line, but I was wondering, is there a way to do it with foreach cycles or something like that? thanks.
tikz-pgf diagrams
add a comment |
I have this diagram, and I have tried to draw it doing every dot and line, but I was wondering, is there a way to do it with foreach cycles or something like that? thanks.
tikz-pgf diagrams
4
What have you tried so far? Anyway you are not a new user anymore
– JouleV
5 hours ago
1
@close-voters: The OP hasn't been online for 2 hours, i.e. he doesn't know what is going on yet. Give him some time.
– JouleV
3 hours ago
@JouleV Questions can also be reopened. In its current state it is unclear. Therefore voting to close.
– Henri Menke
2 hours ago
@HenriMenke The question is not unclear. OP informs us that he/she have solved the problem, but the code used is not optimal OP then asks if somebody may give him a tip how to solve the same with a loop or similar. OP does not ask you to write the code, just provide a hint, as JouleV has done.
– Sveinung
58 mins ago
add a comment |
I have this diagram, and I have tried to draw it doing every dot and line, but I was wondering, is there a way to do it with foreach cycles or something like that? thanks.
tikz-pgf diagrams
I have this diagram, and I have tried to draw it doing every dot and line, but I was wondering, is there a way to do it with foreach cycles or something like that? thanks.
tikz-pgf diagrams
tikz-pgf diagrams
edited 3 hours ago
![](https://i.stack.imgur.com/egxF7.jpg?s=32&g=1)
![](https://i.stack.imgur.com/egxF7.jpg?s=32&g=1)
JouleV
14.5k22665
14.5k22665
asked 5 hours ago
J.RodriguezJ.Rodriguez
3046
3046
4
What have you tried so far? Anyway you are not a new user anymore
– JouleV
5 hours ago
1
@close-voters: The OP hasn't been online for 2 hours, i.e. he doesn't know what is going on yet. Give him some time.
– JouleV
3 hours ago
@JouleV Questions can also be reopened. In its current state it is unclear. Therefore voting to close.
– Henri Menke
2 hours ago
@HenriMenke The question is not unclear. OP informs us that he/she have solved the problem, but the code used is not optimal OP then asks if somebody may give him a tip how to solve the same with a loop or similar. OP does not ask you to write the code, just provide a hint, as JouleV has done.
– Sveinung
58 mins ago
add a comment |
4
What have you tried so far? Anyway you are not a new user anymore
– JouleV
5 hours ago
1
@close-voters: The OP hasn't been online for 2 hours, i.e. he doesn't know what is going on yet. Give him some time.
– JouleV
3 hours ago
@JouleV Questions can also be reopened. In its current state it is unclear. Therefore voting to close.
– Henri Menke
2 hours ago
@HenriMenke The question is not unclear. OP informs us that he/she have solved the problem, but the code used is not optimal OP then asks if somebody may give him a tip how to solve the same with a loop or similar. OP does not ask you to write the code, just provide a hint, as JouleV has done.
– Sveinung
58 mins ago
4
4
What have you tried so far? Anyway you are not a new user anymore
– JouleV
5 hours ago
What have you tried so far? Anyway you are not a new user anymore
– JouleV
5 hours ago
1
1
@close-voters: The OP hasn't been online for 2 hours, i.e. he doesn't know what is going on yet. Give him some time.
– JouleV
3 hours ago
@close-voters: The OP hasn't been online for 2 hours, i.e. he doesn't know what is going on yet. Give him some time.
– JouleV
3 hours ago
@JouleV Questions can also be reopened. In its current state it is unclear. Therefore voting to close.
– Henri Menke
2 hours ago
@JouleV Questions can also be reopened. In its current state it is unclear. Therefore voting to close.
– Henri Menke
2 hours ago
@HenriMenke The question is not unclear. OP informs us that he/she have solved the problem, but the code used is not optimal OP then asks if somebody may give him a tip how to solve the same with a loop or similar. OP does not ask you to write the code, just provide a hint, as JouleV has done.
– Sveinung
58 mins ago
@HenriMenke The question is not unclear. OP informs us that he/she have solved the problem, but the code used is not optimal OP then asks if somebody may give him a tip how to solve the same with a loop or similar. OP does not ask you to write the code, just provide a hint, as JouleV has done.
– Sveinung
58 mins ago
add a comment |
1 Answer
1
active
oldest
votes
This does not provide a full code, but a hint so that you can shorten your code. You can use a pic
for every group of dots like that.
documentclass[tikz]{standalone}
tikzset{
dotcirc/.style={circle,inner sep=2pt,draw,fill=#1},
pics/tripdots/.style args={#1/#2-#3/#4-#5/#6,name=#7}{
code={
begin{scope}[local bounding box=#7]
draw (-1.2,0)--(1.2,0);
draw (0,0.2)--(0,-.2);
path (-1,0) node[dotcirc=#1] (#2) {};
path (0,0) node[dotcirc=#3] (#4) {};
path (1,0) node[dotcirc=#5] (#6) {};
end{scope}
}
}
}
begin{document}
begin{tikzpicture}
pic at (0,0) {tripdots={red/ra-yellow/ya-green/ga,name=a}};
draw[<-] (a) -- ++(.5,1) node[above] {scalebox{0.5}{Traffic lights}};
draw[<-] (ra) -- ++ (.5,-1) node[below] {scalebox{0.5}{A colored circle}};
end{tikzpicture}
end{document}
A good answer to the question. :)
– Sveinung
57 mins ago
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%2f485713%2fhow-to-draw-this-diagram-graph-using-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
This does not provide a full code, but a hint so that you can shorten your code. You can use a pic
for every group of dots like that.
documentclass[tikz]{standalone}
tikzset{
dotcirc/.style={circle,inner sep=2pt,draw,fill=#1},
pics/tripdots/.style args={#1/#2-#3/#4-#5/#6,name=#7}{
code={
begin{scope}[local bounding box=#7]
draw (-1.2,0)--(1.2,0);
draw (0,0.2)--(0,-.2);
path (-1,0) node[dotcirc=#1] (#2) {};
path (0,0) node[dotcirc=#3] (#4) {};
path (1,0) node[dotcirc=#5] (#6) {};
end{scope}
}
}
}
begin{document}
begin{tikzpicture}
pic at (0,0) {tripdots={red/ra-yellow/ya-green/ga,name=a}};
draw[<-] (a) -- ++(.5,1) node[above] {scalebox{0.5}{Traffic lights}};
draw[<-] (ra) -- ++ (.5,-1) node[below] {scalebox{0.5}{A colored circle}};
end{tikzpicture}
end{document}
A good answer to the question. :)
– Sveinung
57 mins ago
add a comment |
This does not provide a full code, but a hint so that you can shorten your code. You can use a pic
for every group of dots like that.
documentclass[tikz]{standalone}
tikzset{
dotcirc/.style={circle,inner sep=2pt,draw,fill=#1},
pics/tripdots/.style args={#1/#2-#3/#4-#5/#6,name=#7}{
code={
begin{scope}[local bounding box=#7]
draw (-1.2,0)--(1.2,0);
draw (0,0.2)--(0,-.2);
path (-1,0) node[dotcirc=#1] (#2) {};
path (0,0) node[dotcirc=#3] (#4) {};
path (1,0) node[dotcirc=#5] (#6) {};
end{scope}
}
}
}
begin{document}
begin{tikzpicture}
pic at (0,0) {tripdots={red/ra-yellow/ya-green/ga,name=a}};
draw[<-] (a) -- ++(.5,1) node[above] {scalebox{0.5}{Traffic lights}};
draw[<-] (ra) -- ++ (.5,-1) node[below] {scalebox{0.5}{A colored circle}};
end{tikzpicture}
end{document}
A good answer to the question. :)
– Sveinung
57 mins ago
add a comment |
This does not provide a full code, but a hint so that you can shorten your code. You can use a pic
for every group of dots like that.
documentclass[tikz]{standalone}
tikzset{
dotcirc/.style={circle,inner sep=2pt,draw,fill=#1},
pics/tripdots/.style args={#1/#2-#3/#4-#5/#6,name=#7}{
code={
begin{scope}[local bounding box=#7]
draw (-1.2,0)--(1.2,0);
draw (0,0.2)--(0,-.2);
path (-1,0) node[dotcirc=#1] (#2) {};
path (0,0) node[dotcirc=#3] (#4) {};
path (1,0) node[dotcirc=#5] (#6) {};
end{scope}
}
}
}
begin{document}
begin{tikzpicture}
pic at (0,0) {tripdots={red/ra-yellow/ya-green/ga,name=a}};
draw[<-] (a) -- ++(.5,1) node[above] {scalebox{0.5}{Traffic lights}};
draw[<-] (ra) -- ++ (.5,-1) node[below] {scalebox{0.5}{A colored circle}};
end{tikzpicture}
end{document}
This does not provide a full code, but a hint so that you can shorten your code. You can use a pic
for every group of dots like that.
documentclass[tikz]{standalone}
tikzset{
dotcirc/.style={circle,inner sep=2pt,draw,fill=#1},
pics/tripdots/.style args={#1/#2-#3/#4-#5/#6,name=#7}{
code={
begin{scope}[local bounding box=#7]
draw (-1.2,0)--(1.2,0);
draw (0,0.2)--(0,-.2);
path (-1,0) node[dotcirc=#1] (#2) {};
path (0,0) node[dotcirc=#3] (#4) {};
path (1,0) node[dotcirc=#5] (#6) {};
end{scope}
}
}
}
begin{document}
begin{tikzpicture}
pic at (0,0) {tripdots={red/ra-yellow/ya-green/ga,name=a}};
draw[<-] (a) -- ++(.5,1) node[above] {scalebox{0.5}{Traffic lights}};
draw[<-] (ra) -- ++ (.5,-1) node[below] {scalebox{0.5}{A colored circle}};
end{tikzpicture}
end{document}
edited 27 mins ago
answered 4 hours ago
![](https://i.stack.imgur.com/egxF7.jpg?s=32&g=1)
![](https://i.stack.imgur.com/egxF7.jpg?s=32&g=1)
JouleVJouleV
14.5k22665
14.5k22665
A good answer to the question. :)
– Sveinung
57 mins ago
add a comment |
A good answer to the question. :)
– Sveinung
57 mins ago
A good answer to the question. :)
– Sveinung
57 mins ago
A good answer to the question. :)
– Sveinung
57 mins ago
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%2f485713%2fhow-to-draw-this-diagram-graph-using-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
4
What have you tried so far? Anyway you are not a new user anymore
– JouleV
5 hours ago
1
@close-voters: The OP hasn't been online for 2 hours, i.e. he doesn't know what is going on yet. Give him some time.
– JouleV
3 hours ago
@JouleV Questions can also be reopened. In its current state it is unclear. Therefore voting to close.
– Henri Menke
2 hours ago
@HenriMenke The question is not unclear. OP informs us that he/she have solved the problem, but the code used is not optimal OP then asks if somebody may give him a tip how to solve the same with a loop or similar. OP does not ask you to write the code, just provide a hint, as JouleV has done.
– Sveinung
58 mins ago