How to plot diagram like a “#” in tikz









up vote
4
down vote

favorite
2












I don't know how to plot diagram like a "#", anyone could give some tips?



Thank you!
enter image description here










share|improve this question





















  • 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














up vote
4
down vote

favorite
2












I don't know how to plot diagram like a "#", anyone could give some tips?



Thank you!
enter image description here










share|improve this question





















  • 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












up vote
4
down vote

favorite
2









up vote
4
down vote

favorite
2






2





I don't know how to plot diagram like a "#", anyone could give some tips?



Thank you!
enter image description here










share|improve this question













I don't know how to plot diagram like a "#", anyone could give some tips?



Thank you!
enter image description here







tikz-arrows plot






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 1:50









Ben

1306




1306











  • 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
















  • 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















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










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
usetikzlibraryintersections
defldarray"i","i+1"
defluarray"k","k+mu","k+1"
begindocument
begintikzpicture
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
pgfmathsetmacroldldarray[YY]
pgfmathsetmacroluluarray[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$];
endtikzpicture
enddocument


enter image description here






share|improve this answer






















  • 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

















up vote
7
down vote













Follow marmot's sample,



Notice usetikzlibraryintersections and in the following code, define $Y= 1,2$ is the Horizontal line, and $X=1,2,3$ is the vert...



begincenter
begintikzpicture
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
deflyi
else
deflyi+1
fi
ifnumX=1
defldk
else
ifnumX=2
defldk+mu
else
defldk+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$];
endtikzpicture
endcenter


enter image description here






share|improve this answer




















    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%2f459404%2fhow-to-plot-diagram-like-a-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








    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
    usetikzlibraryintersections
    defldarray"i","i+1"
    defluarray"k","k+mu","k+1"
    begindocument
    begintikzpicture
    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
    pgfmathsetmacroldldarray[YY]
    pgfmathsetmacroluluarray[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$];
    endtikzpicture
    enddocument


    enter image description here






    share|improve this answer






















    • 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














    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
    usetikzlibraryintersections
    defldarray"i","i+1"
    defluarray"k","k+mu","k+1"
    begindocument
    begintikzpicture
    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
    pgfmathsetmacroldldarray[YY]
    pgfmathsetmacroluluarray[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$];
    endtikzpicture
    enddocument


    enter image description here






    share|improve this answer






















    • 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












    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
    usetikzlibraryintersections
    defldarray"i","i+1"
    defluarray"k","k+mu","k+1"
    begindocument
    begintikzpicture
    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
    pgfmathsetmacroldldarray[YY]
    pgfmathsetmacroluluarray[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$];
    endtikzpicture
    enddocument


    enter image description here






    share|improve this answer














    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
    usetikzlibraryintersections
    defldarray"i","i+1"
    defluarray"k","k+mu","k+1"
    begindocument
    begintikzpicture
    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
    pgfmathsetmacroldldarray[YY]
    pgfmathsetmacroluluarray[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$];
    endtikzpicture
    enddocument


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 11 at 3:55

























    answered Nov 11 at 2:11









    marmot

    84.3k495179




    84.3k495179











    • 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
















    • 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















    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










    up vote
    7
    down vote













    Follow marmot's sample,



    Notice usetikzlibraryintersections and in the following code, define $Y= 1,2$ is the Horizontal line, and $X=1,2,3$ is the vert...



    begincenter
    begintikzpicture
    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
    deflyi
    else
    deflyi+1
    fi
    ifnumX=1
    defldk
    else
    ifnumX=2
    defldk+mu
    else
    defldk+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$];
    endtikzpicture
    endcenter


    enter image description here






    share|improve this answer
























      up vote
      7
      down vote













      Follow marmot's sample,



      Notice usetikzlibraryintersections and in the following code, define $Y= 1,2$ is the Horizontal line, and $X=1,2,3$ is the vert...



      begincenter
      begintikzpicture
      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
      deflyi
      else
      deflyi+1
      fi
      ifnumX=1
      defldk
      else
      ifnumX=2
      defldk+mu
      else
      defldk+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$];
      endtikzpicture
      endcenter


      enter image description here






      share|improve this answer






















        up vote
        7
        down vote










        up vote
        7
        down vote









        Follow marmot's sample,



        Notice usetikzlibraryintersections and in the following code, define $Y= 1,2$ is the Horizontal line, and $X=1,2,3$ is the vert...



        begincenter
        begintikzpicture
        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
        deflyi
        else
        deflyi+1
        fi
        ifnumX=1
        defldk
        else
        ifnumX=2
        defldk+mu
        else
        defldk+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$];
        endtikzpicture
        endcenter


        enter image description here






        share|improve this answer












        Follow marmot's sample,



        Notice usetikzlibraryintersections and in the following code, define $Y= 1,2$ is the Horizontal line, and $X=1,2,3$ is the vert...



        begincenter
        begintikzpicture
        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
        deflyi
        else
        deflyi+1
        fi
        ifnumX=1
        defldk
        else
        ifnumX=2
        defldk+mu
        else
        defldk+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$];
        endtikzpicture
        endcenter


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 11 at 2:38









        Ben

        1306




        1306



























            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.





            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.




            draft saved


            draft discarded














            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





















































            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

            Use pre created SQLite database for Android project in kotlin

            Darth Vader #20

            Ondo