How to plot diagram like a “#” in tikz
up vote
4
down vote
favorite
I don't know how to plot diagram like a "#", anyone could give some tips?
Thank you!
tikz-arrows plot
add a comment |
up vote
4
down vote
favorite
I don't know how to plot diagram like a "#", anyone could give some tips?
Thank you!
tikz-arrows plot
Welcome to TeX.SX! Are those lines supposed to be bent or straight? Also, what have you tried so far?
– siracusa
Nov 11 at 2:04
I try the straight line throughtikzcd
, if I succeed I will paste my code.
– Ben
Nov 11 at 2:14
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I don't know how to plot diagram like a "#", anyone could give some tips?
Thank you!
tikz-arrows plot
I don't know how to plot diagram like a "#", anyone could give some tips?
Thank you!
tikz-arrows plot
tikz-arrows plot
asked Nov 11 at 1:50
Ben
1036
1036
Welcome to TeX.SX! Are those lines supposed to be bent or straight? Also, what have you tried so far?
– siracusa
Nov 11 at 2:04
I try the straight line throughtikzcd
, if I succeed I will paste my code.
– Ben
Nov 11 at 2:14
add a comment |
Welcome to TeX.SX! Are those lines supposed to be bent or straight? Also, what have you tried so far?
– siracusa
Nov 11 at 2:04
I try the straight line throughtikzcd
, if I succeed I will paste my code.
– Ben
Nov 11 at 2:14
Welcome to TeX.SX! Are those lines supposed to be bent or straight? Also, what have you tried so far?
– siracusa
Nov 11 at 2:04
Welcome to TeX.SX! Are those lines supposed to be bent or straight? Also, what have you tried so far?
– siracusa
Nov 11 at 2:04
I try the straight line through
tikzcd
, if I succeed I will paste my code.– Ben
Nov 11 at 2:14
I try the straight line through
tikzcd
, if I succeed I will paste my code.– Ben
Nov 11 at 2:14
add a comment |
2 Answers
2
active
oldest
votes
up vote
12
down vote
accepted
Welcome to TeX.SE! Can one draw such a graph? Sure. Are people here willing to do that for you? Well this will depend on their mood and also how new you are. Believe me, it is much more fun to do it on your own. Note also that there are 3d packages and nonlinear transformations etc. which can do a much better job if you have a concrete scenario and want more than just a cartoon.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{intersections}
defldarray{{"i","i+1"}}
defluarray{{"k","k+mu","k+1"}}
begin{document}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X [count=XX starting from 0] in {1,2,3}
{foreach Y [count=YY starting from 0] in {1,2}
{pgfmathsetmacro{ld}{ldarray[YY]}
pgfmathsetmacro{lu}{luarray[XX]}
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ld}^{lu}$]{};}}
end{tikzpicture}
end{document}
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all theifnum
stuff ...
– marmot
Nov 11 at 2:41
add a comment |
up vote
7
down vote
Follow marmot's sample,
Notice usetikzlibrary{intersections}
and in the following code, define $Y= {1,2}$ is the Horizontal line, and $X={1,2,3}$ is the vert...
begin{center}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X in {1,2,3}
{foreach Y in {1,2}
{ifnumY=1
defly{i}
else
defly{i+1}
fi
ifnumX=1
defld{k}
else
ifnumX=2
defld{k+mu}
else
defld{k+1}
fi
fi
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ly}^{ld}$]{};}}
end{tikzpicture}
end{center}
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
accepted
Welcome to TeX.SE! Can one draw such a graph? Sure. Are people here willing to do that for you? Well this will depend on their mood and also how new you are. Believe me, it is much more fun to do it on your own. Note also that there are 3d packages and nonlinear transformations etc. which can do a much better job if you have a concrete scenario and want more than just a cartoon.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{intersections}
defldarray{{"i","i+1"}}
defluarray{{"k","k+mu","k+1"}}
begin{document}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X [count=XX starting from 0] in {1,2,3}
{foreach Y [count=YY starting from 0] in {1,2}
{pgfmathsetmacro{ld}{ldarray[YY]}
pgfmathsetmacro{lu}{luarray[XX]}
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ld}^{lu}$]{};}}
end{tikzpicture}
end{document}
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all theifnum
stuff ...
– marmot
Nov 11 at 2:41
add a comment |
up vote
12
down vote
accepted
Welcome to TeX.SE! Can one draw such a graph? Sure. Are people here willing to do that for you? Well this will depend on their mood and also how new you are. Believe me, it is much more fun to do it on your own. Note also that there are 3d packages and nonlinear transformations etc. which can do a much better job if you have a concrete scenario and want more than just a cartoon.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{intersections}
defldarray{{"i","i+1"}}
defluarray{{"k","k+mu","k+1"}}
begin{document}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X [count=XX starting from 0] in {1,2,3}
{foreach Y [count=YY starting from 0] in {1,2}
{pgfmathsetmacro{ld}{ldarray[YY]}
pgfmathsetmacro{lu}{luarray[XX]}
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ld}^{lu}$]{};}}
end{tikzpicture}
end{document}
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all theifnum
stuff ...
– marmot
Nov 11 at 2:41
add a comment |
up vote
12
down vote
accepted
up vote
12
down vote
accepted
Welcome to TeX.SE! Can one draw such a graph? Sure. Are people here willing to do that for you? Well this will depend on their mood and also how new you are. Believe me, it is much more fun to do it on your own. Note also that there are 3d packages and nonlinear transformations etc. which can do a much better job if you have a concrete scenario and want more than just a cartoon.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{intersections}
defldarray{{"i","i+1"}}
defluarray{{"k","k+mu","k+1"}}
begin{document}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X [count=XX starting from 0] in {1,2,3}
{foreach Y [count=YY starting from 0] in {1,2}
{pgfmathsetmacro{ld}{ldarray[YY]}
pgfmathsetmacro{lu}{luarray[XX]}
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ld}^{lu}$]{};}}
end{tikzpicture}
end{document}
Welcome to TeX.SE! Can one draw such a graph? Sure. Are people here willing to do that for you? Well this will depend on their mood and also how new you are. Believe me, it is much more fun to do it on your own. Note also that there are 3d packages and nonlinear transformations etc. which can do a much better job if you have a concrete scenario and want more than just a cartoon.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{intersections}
defldarray{{"i","i+1"}}
defluarray{{"k","k+mu","k+1"}}
begin{document}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X [count=XX starting from 0] in {1,2,3}
{foreach Y [count=YY starting from 0] in {1,2}
{pgfmathsetmacro{ld}{ldarray[YY]}
pgfmathsetmacro{lu}{luarray[XX]}
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ld}^{lu}$]{};}}
end{tikzpicture}
end{document}
edited Nov 11 at 3:55
answered Nov 11 at 2:11
marmot
80.4k491172
80.4k491172
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all theifnum
stuff ...
– marmot
Nov 11 at 2:41
add a comment |
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all theifnum
stuff ...
– marmot
Nov 11 at 2:41
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
thank you very much. Follow your sample, i solve the problem.
– Ben
Nov 11 at 2:33
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all the
ifnum
stuff ...– marmot
Nov 11 at 2:41
@Ben You're welcome. I actually simplified the code quite a bit by getting rid of all the
ifnum
stuff ...– marmot
Nov 11 at 2:41
add a comment |
up vote
7
down vote
Follow marmot's sample,
Notice usetikzlibrary{intersections}
and in the following code, define $Y= {1,2}$ is the Horizontal line, and $X={1,2,3}$ is the vert...
begin{center}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X in {1,2,3}
{foreach Y in {1,2}
{ifnumY=1
defly{i}
else
defly{i+1}
fi
ifnumX=1
defld{k}
else
ifnumX=2
defld{k+mu}
else
defld{k+1}
fi
fi
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ly}^{ld}$]{};}}
end{tikzpicture}
end{center}
add a comment |
up vote
7
down vote
Follow marmot's sample,
Notice usetikzlibrary{intersections}
and in the following code, define $Y= {1,2}$ is the Horizontal line, and $X={1,2,3}$ is the vert...
begin{center}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X in {1,2,3}
{foreach Y in {1,2}
{ifnumY=1
defly{i}
else
defly{i+1}
fi
ifnumX=1
defld{k}
else
ifnumX=2
defld{k+mu}
else
defld{k+1}
fi
fi
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ly}^{ld}$]{};}}
end{tikzpicture}
end{center}
add a comment |
up vote
7
down vote
up vote
7
down vote
Follow marmot's sample,
Notice usetikzlibrary{intersections}
and in the following code, define $Y= {1,2}$ is the Horizontal line, and $X={1,2,3}$ is the vert...
begin{center}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X in {1,2,3}
{foreach Y in {1,2}
{ifnumY=1
defly{i}
else
defly{i+1}
fi
ifnumX=1
defld{k}
else
ifnumX=2
defld{k+mu}
else
defld{k+1}
fi
fi
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ly}^{ld}$]{};}}
end{tikzpicture}
end{center}
Follow marmot's sample,
Notice usetikzlibrary{intersections}
and in the following code, define $Y= {1,2}$ is the Horizontal line, and $X={1,2,3}$ is the vert...
begin{center}
begin{tikzpicture}
foreach X in {1,2,3}
{draw[name path global=hor-X-0] (0.1*X,2*X) to[bend left=12] ++ (5,1);}
foreach X in {1,2}
{draw[name path global=vert-X-0] (2*X-0.5,1+0.1*X) to[bend left=15] ++ (0.3,7);}
foreach X in {1,2,3}
{foreach Y in {1,2}
{ifnumY=1
defly{i}
else
defly{i+1}
fi
ifnumX=1
defld{k}
else
ifnumX=2
defld{k+mu}
else
defld{k+1}
fi
fi
path[name intersections={of=hor-X-0 and vert-Y-0,by=pXY}] (pXY)
node[circle,fill,inner sep=2pt,label=below right:$g_{ly}^{ld}$]{};}}
end{tikzpicture}
end{center}
answered Nov 11 at 2:38
Ben
1036
1036
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f459404%2fhow-to-plot-diagram-like-a-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! Are those lines supposed to be bent or straight? Also, what have you tried so far?
– siracusa
Nov 11 at 2:04
I try the straight line through
tikzcd
, if I succeed I will paste my code.– Ben
Nov 11 at 2:14