I need help with tikz tree node and label, offsets and inclinationProbability tree using TikZ for Bernoulli experiments?nodes structure like file systemTikz-Tree: Arrow-style depending on parent nodeHow to draw a tree with fixed node distances?Adjust edge endpoints depending on node labelText alignment and form of connectors (edges) in tikz treeforest: Draw a roof over multiple children in forest?Tikz Tree problem with positionMindmap and trees : length of edges for the 3rd level nodes and the rotation around the Root Nodelinking cousins in a binary tree

What problems would a superhuman have who's skin is constantly hot?

What's the 'present simple' form of the word "нашла́" in 3rd person singular female?

When a wind turbine does not produce enough electricity how does the power company compensate for the loss?

Are small insurances worth it?

Power Strip for Europe

Can one live in the U.S. and not use a credit card?

Which classes are needed to have access to every spell in the PHB?

What is better: yes / no radio, or simple checkbox?

Virginia employer terminated employee and wants signing bonus returned

What will happen if my luggage gets delayed?

Why restrict private health insurance?

What is this diamond of every day?

Source permutation

Windows Server Data Center Edition - Unlimited Virtual Machines

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?

Is it a Cyclops number? "Nobody" knows!

I can't die. Who am I?

Do I really need to have a scientific explanation for my premise?

Professor forcing me to attend a conference, I can't afford even with 50% funding

Can't make sense of a paragraph from Lovecraft

Why do we say ‘pairwise disjoint’, rather than ‘disjoint’?

What are some noteworthy "mic-drop" moments in math?

Finitely many repeated replacements

Can we track matter through time by looking at different depths in space?



I need help with tikz tree node and label, offsets and inclination


Probability tree using TikZ for Bernoulli experiments?nodes structure like file systemTikz-Tree: Arrow-style depending on parent nodeHow to draw a tree with fixed node distances?Adjust edge endpoints depending on node labelText alignment and form of connectors (edges) in tikz treeforest: Draw a roof over multiple children in forest?Tikz Tree problem with positionMindmap and trees : length of edges for the 3rd level nodes and the rotation around the Root Nodelinking cousins in a binary tree













2















I need to draw something like this:



My problem are the black dots position i.e. nodes S and M and the labels position, also the number labels does not look good too.



The X node is beside Coke node not in the edge between Cabonated_Drinks and Coke.



enter image description here



this is what i got:



documentclassstandalone
usepackagetikz
usepackageamsmath

tikzset
solid node/.style=circle,draw,inner sep=1.2,fill=black,
hollow node/.style=circle,draw,inner sep=1.2,


begindocument
begintikzpicture[font=footnotesize]
tikzset
level 1/.style=level distance=15mm,sibling distance=45mm,
level 2/.style=level distance=15mm,sibling distance=30mm,
level 3/.style=level distance=15mm,sibling distance=15mm,
level 4/.style=level distance=15mm,sibling distance=10mm,


node(A)[hollow node,label=above:ALL]
child
%node(B)[hollow node,label=left:Carbonated Drinks]
node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
child node(D)[hollow node, label=below:Coke]
edge from parent
node[solid node, left, label=left:X, at end]
node[right]1


child node(E)[hollow node, label=below:Pepsi]
edge from parent
node[left]1
node[solid node, right, near start, label=right:T]


edge from parent
node[solid node, left, near start, label=left:S]
node[solid node, right, near start, label=right:M]

edge from parent
node[right]1


child
node(C)[hollow node,label=right:Coffee]
child
node(F)[hollow node, label=below:Mocca]
edge from parent
node[right]1


child
node(G)[hollow node, label=below:Nescaffe]
edge from parent
node[left]1


edge from parent
node[left]1

;
endtikzpicture
enddocument


What gives me an image like this:
enter image description here



Thanks in advance.










share|improve this question









New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    Welcome to TeX.SE! And the proble you have are the positions of the black points? Please do not only show a image and some code, explain your problem in words too!

    – Kurt
    6 hours ago











  • [edited] My problem are the black dots position and the labels position, also the number labels does not look good too.

    – thecharliex
    5 hours ago












  • You can add above or below or xshift=...mm or yshift=...mm into node definitions for black dots positions.

    – ferahfeza
    5 hours ago











  • It's not customary to add “SOLVED” to the title.

    – egreg
    4 hours ago















2















I need to draw something like this:



My problem are the black dots position i.e. nodes S and M and the labels position, also the number labels does not look good too.



The X node is beside Coke node not in the edge between Cabonated_Drinks and Coke.



enter image description here



this is what i got:



documentclassstandalone
usepackagetikz
usepackageamsmath

tikzset
solid node/.style=circle,draw,inner sep=1.2,fill=black,
hollow node/.style=circle,draw,inner sep=1.2,


begindocument
begintikzpicture[font=footnotesize]
tikzset
level 1/.style=level distance=15mm,sibling distance=45mm,
level 2/.style=level distance=15mm,sibling distance=30mm,
level 3/.style=level distance=15mm,sibling distance=15mm,
level 4/.style=level distance=15mm,sibling distance=10mm,


node(A)[hollow node,label=above:ALL]
child
%node(B)[hollow node,label=left:Carbonated Drinks]
node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
child node(D)[hollow node, label=below:Coke]
edge from parent
node[solid node, left, label=left:X, at end]
node[right]1


child node(E)[hollow node, label=below:Pepsi]
edge from parent
node[left]1
node[solid node, right, near start, label=right:T]


edge from parent
node[solid node, left, near start, label=left:S]
node[solid node, right, near start, label=right:M]

edge from parent
node[right]1


child
node(C)[hollow node,label=right:Coffee]
child
node(F)[hollow node, label=below:Mocca]
edge from parent
node[right]1


child
node(G)[hollow node, label=below:Nescaffe]
edge from parent
node[left]1


edge from parent
node[left]1

;
endtikzpicture
enddocument


What gives me an image like this:
enter image description here



Thanks in advance.










share|improve this question









New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    Welcome to TeX.SE! And the proble you have are the positions of the black points? Please do not only show a image and some code, explain your problem in words too!

    – Kurt
    6 hours ago











  • [edited] My problem are the black dots position and the labels position, also the number labels does not look good too.

    – thecharliex
    5 hours ago












  • You can add above or below or xshift=...mm or yshift=...mm into node definitions for black dots positions.

    – ferahfeza
    5 hours ago











  • It's not customary to add “SOLVED” to the title.

    – egreg
    4 hours ago













2












2








2








I need to draw something like this:



My problem are the black dots position i.e. nodes S and M and the labels position, also the number labels does not look good too.



The X node is beside Coke node not in the edge between Cabonated_Drinks and Coke.



enter image description here



this is what i got:



documentclassstandalone
usepackagetikz
usepackageamsmath

tikzset
solid node/.style=circle,draw,inner sep=1.2,fill=black,
hollow node/.style=circle,draw,inner sep=1.2,


begindocument
begintikzpicture[font=footnotesize]
tikzset
level 1/.style=level distance=15mm,sibling distance=45mm,
level 2/.style=level distance=15mm,sibling distance=30mm,
level 3/.style=level distance=15mm,sibling distance=15mm,
level 4/.style=level distance=15mm,sibling distance=10mm,


node(A)[hollow node,label=above:ALL]
child
%node(B)[hollow node,label=left:Carbonated Drinks]
node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
child node(D)[hollow node, label=below:Coke]
edge from parent
node[solid node, left, label=left:X, at end]
node[right]1


child node(E)[hollow node, label=below:Pepsi]
edge from parent
node[left]1
node[solid node, right, near start, label=right:T]


edge from parent
node[solid node, left, near start, label=left:S]
node[solid node, right, near start, label=right:M]

edge from parent
node[right]1


child
node(C)[hollow node,label=right:Coffee]
child
node(F)[hollow node, label=below:Mocca]
edge from parent
node[right]1


child
node(G)[hollow node, label=below:Nescaffe]
edge from parent
node[left]1


edge from parent
node[left]1

;
endtikzpicture
enddocument


What gives me an image like this:
enter image description here



Thanks in advance.










share|improve this question









New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I need to draw something like this:



My problem are the black dots position i.e. nodes S and M and the labels position, also the number labels does not look good too.



The X node is beside Coke node not in the edge between Cabonated_Drinks and Coke.



enter image description here



this is what i got:



documentclassstandalone
usepackagetikz
usepackageamsmath

tikzset
solid node/.style=circle,draw,inner sep=1.2,fill=black,
hollow node/.style=circle,draw,inner sep=1.2,


begindocument
begintikzpicture[font=footnotesize]
tikzset
level 1/.style=level distance=15mm,sibling distance=45mm,
level 2/.style=level distance=15mm,sibling distance=30mm,
level 3/.style=level distance=15mm,sibling distance=15mm,
level 4/.style=level distance=15mm,sibling distance=10mm,


node(A)[hollow node,label=above:ALL]
child
%node(B)[hollow node,label=left:Carbonated Drinks]
node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
child node(D)[hollow node, label=below:Coke]
edge from parent
node[solid node, left, label=left:X, at end]
node[right]1


child node(E)[hollow node, label=below:Pepsi]
edge from parent
node[left]1
node[solid node, right, near start, label=right:T]


edge from parent
node[solid node, left, near start, label=left:S]
node[solid node, right, near start, label=right:M]

edge from parent
node[right]1


child
node(C)[hollow node,label=right:Coffee]
child
node(F)[hollow node, label=below:Mocca]
edge from parent
node[right]1


child
node(G)[hollow node, label=below:Nescaffe]
edge from parent
node[left]1


edge from parent
node[left]1

;
endtikzpicture
enddocument


What gives me an image like this:
enter image description here



Thanks in advance.







tikz-trees






share|improve this question









New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 4 hours ago









egreg

725k8819193224




725k8819193224






New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 6 hours ago









thecharliexthecharliex

235




235




New contributor




thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 2





    Welcome to TeX.SE! And the proble you have are the positions of the black points? Please do not only show a image and some code, explain your problem in words too!

    – Kurt
    6 hours ago











  • [edited] My problem are the black dots position and the labels position, also the number labels does not look good too.

    – thecharliex
    5 hours ago












  • You can add above or below or xshift=...mm or yshift=...mm into node definitions for black dots positions.

    – ferahfeza
    5 hours ago











  • It's not customary to add “SOLVED” to the title.

    – egreg
    4 hours ago












  • 2





    Welcome to TeX.SE! And the proble you have are the positions of the black points? Please do not only show a image and some code, explain your problem in words too!

    – Kurt
    6 hours ago











  • [edited] My problem are the black dots position and the labels position, also the number labels does not look good too.

    – thecharliex
    5 hours ago












  • You can add above or below or xshift=...mm or yshift=...mm into node definitions for black dots positions.

    – ferahfeza
    5 hours ago











  • It's not customary to add “SOLVED” to the title.

    – egreg
    4 hours ago







2




2





Welcome to TeX.SE! And the proble you have are the positions of the black points? Please do not only show a image and some code, explain your problem in words too!

– Kurt
6 hours ago





Welcome to TeX.SE! And the proble you have are the positions of the black points? Please do not only show a image and some code, explain your problem in words too!

– Kurt
6 hours ago













[edited] My problem are the black dots position and the labels position, also the number labels does not look good too.

– thecharliex
5 hours ago






[edited] My problem are the black dots position and the labels position, also the number labels does not look good too.

– thecharliex
5 hours ago














You can add above or below or xshift=...mm or yshift=...mm into node definitions for black dots positions.

– ferahfeza
5 hours ago





You can add above or below or xshift=...mm or yshift=...mm into node definitions for black dots positions.

– ferahfeza
5 hours ago













It's not customary to add “SOLVED” to the title.

– egreg
4 hours ago





It's not customary to add “SOLVED” to the title.

– egreg
4 hours ago










2 Answers
2






active

oldest

votes


















2














There are two keys which might be useful here: pos and shift. Using these, I got



documentclass[tikz,border=3.14mm]standalone
usepackageamsmath

tikzset
solid node/.style=circle,draw,inner sep=1.2,fill=black,
hollow node/.style=circle,draw,inner sep=1.2,


begindocument
begintikzpicture[font=footnotesize]
tikzset
level 1/.style=level distance=15mm,sibling distance=45mm,
level 2/.style=level distance=15mm,sibling distance=30mm,
level 3/.style=level distance=15mm,sibling distance=15mm,
level 4/.style=level distance=15mm,sibling distance=10mm,


node(A)[hollow node,label=above:ALL]
child
%node(B)[hollow node,label=left:Carbonated Drinks]
node(B)[hollow node,label=[align=left,xshift=1.5em]135:Carbonated\Drinks]
child node(D)[hollow node, label=below:Coke]
edge from parent
node[solid node,pos=0.95,xshift=-0.5em,left, label=left:X]
node[pos=0.6,above left]1


child node(E)[hollow node, label=below:Pepsi]
edge from parent
node[pos=0.6,below left]1
node[solid node, right, pos=0.4, label=right:T]


edge from parent
node[solid node, left, pos=0.35,shift=(120:2pt), label=120:S]
node[solid node, right, pos=0.35,shift=(-60:2pt), label=-60:M]
node[pos=0.6,above left]1


child
node(C)[hollow node,label=right:Coffee]
child
node(F)[hollow node, label=below:Mocca]
edge from parent
node[pos=0.6,above left]1


child
node(G)[hollow node, label=below:Nescaffe]
edge from parent
node[pos=0.6,above right]1


edge from parent
node[pos=0.6,above right]1

;
endtikzpicture
enddocument


enter image description here



On the long run you may benefit from switching to forest.`






share|improve this answer






























    1














    SOLVED
    using properly xshift and yshift with labels and nodes as @marmot says...



    Here is the improved code:



    documentclassstandalone
    usepackagetikz
    usepackageamsmath

    tikzset
    solid node/.style=circle, draw, inner sep=2, fill=black, line width=1pt,
    hollow node/.style=circle, draw, inner sep=2, line width=1pt ,


    %child{node(l1)[hollow node, label=below:D]

    begindocument
    begintikzpicture[font=footnotesize]
    tikzset
    level 1/.style=level distance=15mm,sibling distance=45mm, line width=1pt,
    level 2/.style=level distance=15mm,sibling distance=30mm,
    level 3/.style=level distance=15mm,sibling distance=15mm,
    level 4/.style=level distance=15mm,sibling distance=10mm,


    node(A)[hollow node,label=above:ALL]
    child
    %node(B)[hollow node,label=left:Carbonated Drinks]
    node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
    child node(D)[hollow node, label=below:Coke]
    edge from parent
    node[solid node, xshift=-1pt, yshift=+3pt, left, label=left:X, at end]
    node[right]1


    child node(E)[hollow node, label=below:Pepsi]
    edge from parent
    node[left]1
    node[solid node, rotate=+45pt, right, near start, label=[xshift=-1.0pt, yshift=-9.0pt]right:T]


    edge from parent
    node[solid node, rotate=-45, left, near start,label=[xshift=2.0pt, yshift=-7.0pt]left:S]
    node[solid node, rotate=-45, right, near start, label=[xshift=-2.0pt, yshift=7.0pt]right:M]

    edge from parent
    node[right]1


    child
    node(C)[hollow node,label=right:Coffee]
    child
    node(F)[hollow node, label=below:Mocca]
    edge from parent
    node[right]1


    child
    node(G)[hollow node, label=below:Nescaffe]
    edge from parent
    node[left]1


    edge from parent
    node[left]1

    ;
    endtikzpicture
    enddocument


    I got:



    enter image description here



    thanks all @marmot, @ferahfeza






    share|improve this answer








    New contributor




    thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.



















      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
      );



      );






      thecharliex is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478785%2fi-need-help-with-tikz-tree-node-and-label-offsets-and-inclination%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









      2














      There are two keys which might be useful here: pos and shift. Using these, I got



      documentclass[tikz,border=3.14mm]standalone
      usepackageamsmath

      tikzset
      solid node/.style=circle,draw,inner sep=1.2,fill=black,
      hollow node/.style=circle,draw,inner sep=1.2,


      begindocument
      begintikzpicture[font=footnotesize]
      tikzset
      level 1/.style=level distance=15mm,sibling distance=45mm,
      level 2/.style=level distance=15mm,sibling distance=30mm,
      level 3/.style=level distance=15mm,sibling distance=15mm,
      level 4/.style=level distance=15mm,sibling distance=10mm,


      node(A)[hollow node,label=above:ALL]
      child
      %node(B)[hollow node,label=left:Carbonated Drinks]
      node(B)[hollow node,label=[align=left,xshift=1.5em]135:Carbonated\Drinks]
      child node(D)[hollow node, label=below:Coke]
      edge from parent
      node[solid node,pos=0.95,xshift=-0.5em,left, label=left:X]
      node[pos=0.6,above left]1


      child node(E)[hollow node, label=below:Pepsi]
      edge from parent
      node[pos=0.6,below left]1
      node[solid node, right, pos=0.4, label=right:T]


      edge from parent
      node[solid node, left, pos=0.35,shift=(120:2pt), label=120:S]
      node[solid node, right, pos=0.35,shift=(-60:2pt), label=-60:M]
      node[pos=0.6,above left]1


      child
      node(C)[hollow node,label=right:Coffee]
      child
      node(F)[hollow node, label=below:Mocca]
      edge from parent
      node[pos=0.6,above left]1


      child
      node(G)[hollow node, label=below:Nescaffe]
      edge from parent
      node[pos=0.6,above right]1


      edge from parent
      node[pos=0.6,above right]1

      ;
      endtikzpicture
      enddocument


      enter image description here



      On the long run you may benefit from switching to forest.`






      share|improve this answer



























        2














        There are two keys which might be useful here: pos and shift. Using these, I got



        documentclass[tikz,border=3.14mm]standalone
        usepackageamsmath

        tikzset
        solid node/.style=circle,draw,inner sep=1.2,fill=black,
        hollow node/.style=circle,draw,inner sep=1.2,


        begindocument
        begintikzpicture[font=footnotesize]
        tikzset
        level 1/.style=level distance=15mm,sibling distance=45mm,
        level 2/.style=level distance=15mm,sibling distance=30mm,
        level 3/.style=level distance=15mm,sibling distance=15mm,
        level 4/.style=level distance=15mm,sibling distance=10mm,


        node(A)[hollow node,label=above:ALL]
        child
        %node(B)[hollow node,label=left:Carbonated Drinks]
        node(B)[hollow node,label=[align=left,xshift=1.5em]135:Carbonated\Drinks]
        child node(D)[hollow node, label=below:Coke]
        edge from parent
        node[solid node,pos=0.95,xshift=-0.5em,left, label=left:X]
        node[pos=0.6,above left]1


        child node(E)[hollow node, label=below:Pepsi]
        edge from parent
        node[pos=0.6,below left]1
        node[solid node, right, pos=0.4, label=right:T]


        edge from parent
        node[solid node, left, pos=0.35,shift=(120:2pt), label=120:S]
        node[solid node, right, pos=0.35,shift=(-60:2pt), label=-60:M]
        node[pos=0.6,above left]1


        child
        node(C)[hollow node,label=right:Coffee]
        child
        node(F)[hollow node, label=below:Mocca]
        edge from parent
        node[pos=0.6,above left]1


        child
        node(G)[hollow node, label=below:Nescaffe]
        edge from parent
        node[pos=0.6,above right]1


        edge from parent
        node[pos=0.6,above right]1

        ;
        endtikzpicture
        enddocument


        enter image description here



        On the long run you may benefit from switching to forest.`






        share|improve this answer

























          2












          2








          2







          There are two keys which might be useful here: pos and shift. Using these, I got



          documentclass[tikz,border=3.14mm]standalone
          usepackageamsmath

          tikzset
          solid node/.style=circle,draw,inner sep=1.2,fill=black,
          hollow node/.style=circle,draw,inner sep=1.2,


          begindocument
          begintikzpicture[font=footnotesize]
          tikzset
          level 1/.style=level distance=15mm,sibling distance=45mm,
          level 2/.style=level distance=15mm,sibling distance=30mm,
          level 3/.style=level distance=15mm,sibling distance=15mm,
          level 4/.style=level distance=15mm,sibling distance=10mm,


          node(A)[hollow node,label=above:ALL]
          child
          %node(B)[hollow node,label=left:Carbonated Drinks]
          node(B)[hollow node,label=[align=left,xshift=1.5em]135:Carbonated\Drinks]
          child node(D)[hollow node, label=below:Coke]
          edge from parent
          node[solid node,pos=0.95,xshift=-0.5em,left, label=left:X]
          node[pos=0.6,above left]1


          child node(E)[hollow node, label=below:Pepsi]
          edge from parent
          node[pos=0.6,below left]1
          node[solid node, right, pos=0.4, label=right:T]


          edge from parent
          node[solid node, left, pos=0.35,shift=(120:2pt), label=120:S]
          node[solid node, right, pos=0.35,shift=(-60:2pt), label=-60:M]
          node[pos=0.6,above left]1


          child
          node(C)[hollow node,label=right:Coffee]
          child
          node(F)[hollow node, label=below:Mocca]
          edge from parent
          node[pos=0.6,above left]1


          child
          node(G)[hollow node, label=below:Nescaffe]
          edge from parent
          node[pos=0.6,above right]1


          edge from parent
          node[pos=0.6,above right]1

          ;
          endtikzpicture
          enddocument


          enter image description here



          On the long run you may benefit from switching to forest.`






          share|improve this answer













          There are two keys which might be useful here: pos and shift. Using these, I got



          documentclass[tikz,border=3.14mm]standalone
          usepackageamsmath

          tikzset
          solid node/.style=circle,draw,inner sep=1.2,fill=black,
          hollow node/.style=circle,draw,inner sep=1.2,


          begindocument
          begintikzpicture[font=footnotesize]
          tikzset
          level 1/.style=level distance=15mm,sibling distance=45mm,
          level 2/.style=level distance=15mm,sibling distance=30mm,
          level 3/.style=level distance=15mm,sibling distance=15mm,
          level 4/.style=level distance=15mm,sibling distance=10mm,


          node(A)[hollow node,label=above:ALL]
          child
          %node(B)[hollow node,label=left:Carbonated Drinks]
          node(B)[hollow node,label=[align=left,xshift=1.5em]135:Carbonated\Drinks]
          child node(D)[hollow node, label=below:Coke]
          edge from parent
          node[solid node,pos=0.95,xshift=-0.5em,left, label=left:X]
          node[pos=0.6,above left]1


          child node(E)[hollow node, label=below:Pepsi]
          edge from parent
          node[pos=0.6,below left]1
          node[solid node, right, pos=0.4, label=right:T]


          edge from parent
          node[solid node, left, pos=0.35,shift=(120:2pt), label=120:S]
          node[solid node, right, pos=0.35,shift=(-60:2pt), label=-60:M]
          node[pos=0.6,above left]1


          child
          node(C)[hollow node,label=right:Coffee]
          child
          node(F)[hollow node, label=below:Mocca]
          edge from parent
          node[pos=0.6,above left]1


          child
          node(G)[hollow node, label=below:Nescaffe]
          edge from parent
          node[pos=0.6,above right]1


          edge from parent
          node[pos=0.6,above right]1

          ;
          endtikzpicture
          enddocument


          enter image description here



          On the long run you may benefit from switching to forest.`







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 5 hours ago









          marmotmarmot

          107k5129243




          107k5129243





















              1














              SOLVED
              using properly xshift and yshift with labels and nodes as @marmot says...



              Here is the improved code:



              documentclassstandalone
              usepackagetikz
              usepackageamsmath

              tikzset
              solid node/.style=circle, draw, inner sep=2, fill=black, line width=1pt,
              hollow node/.style=circle, draw, inner sep=2, line width=1pt ,


              %child{node(l1)[hollow node, label=below:D]

              begindocument
              begintikzpicture[font=footnotesize]
              tikzset
              level 1/.style=level distance=15mm,sibling distance=45mm, line width=1pt,
              level 2/.style=level distance=15mm,sibling distance=30mm,
              level 3/.style=level distance=15mm,sibling distance=15mm,
              level 4/.style=level distance=15mm,sibling distance=10mm,


              node(A)[hollow node,label=above:ALL]
              child
              %node(B)[hollow node,label=left:Carbonated Drinks]
              node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
              child node(D)[hollow node, label=below:Coke]
              edge from parent
              node[solid node, xshift=-1pt, yshift=+3pt, left, label=left:X, at end]
              node[right]1


              child node(E)[hollow node, label=below:Pepsi]
              edge from parent
              node[left]1
              node[solid node, rotate=+45pt, right, near start, label=[xshift=-1.0pt, yshift=-9.0pt]right:T]


              edge from parent
              node[solid node, rotate=-45, left, near start,label=[xshift=2.0pt, yshift=-7.0pt]left:S]
              node[solid node, rotate=-45, right, near start, label=[xshift=-2.0pt, yshift=7.0pt]right:M]

              edge from parent
              node[right]1


              child
              node(C)[hollow node,label=right:Coffee]
              child
              node(F)[hollow node, label=below:Mocca]
              edge from parent
              node[right]1


              child
              node(G)[hollow node, label=below:Nescaffe]
              edge from parent
              node[left]1


              edge from parent
              node[left]1

              ;
              endtikzpicture
              enddocument


              I got:



              enter image description here



              thanks all @marmot, @ferahfeza






              share|improve this answer








              New contributor




              thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                1














                SOLVED
                using properly xshift and yshift with labels and nodes as @marmot says...



                Here is the improved code:



                documentclassstandalone
                usepackagetikz
                usepackageamsmath

                tikzset
                solid node/.style=circle, draw, inner sep=2, fill=black, line width=1pt,
                hollow node/.style=circle, draw, inner sep=2, line width=1pt ,


                %child{node(l1)[hollow node, label=below:D]

                begindocument
                begintikzpicture[font=footnotesize]
                tikzset
                level 1/.style=level distance=15mm,sibling distance=45mm, line width=1pt,
                level 2/.style=level distance=15mm,sibling distance=30mm,
                level 3/.style=level distance=15mm,sibling distance=15mm,
                level 4/.style=level distance=15mm,sibling distance=10mm,


                node(A)[hollow node,label=above:ALL]
                child
                %node(B)[hollow node,label=left:Carbonated Drinks]
                node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
                child node(D)[hollow node, label=below:Coke]
                edge from parent
                node[solid node, xshift=-1pt, yshift=+3pt, left, label=left:X, at end]
                node[right]1


                child node(E)[hollow node, label=below:Pepsi]
                edge from parent
                node[left]1
                node[solid node, rotate=+45pt, right, near start, label=[xshift=-1.0pt, yshift=-9.0pt]right:T]


                edge from parent
                node[solid node, rotate=-45, left, near start,label=[xshift=2.0pt, yshift=-7.0pt]left:S]
                node[solid node, rotate=-45, right, near start, label=[xshift=-2.0pt, yshift=7.0pt]right:M]

                edge from parent
                node[right]1


                child
                node(C)[hollow node,label=right:Coffee]
                child
                node(F)[hollow node, label=below:Mocca]
                edge from parent
                node[right]1


                child
                node(G)[hollow node, label=below:Nescaffe]
                edge from parent
                node[left]1


                edge from parent
                node[left]1

                ;
                endtikzpicture
                enddocument


                I got:



                enter image description here



                thanks all @marmot, @ferahfeza






                share|improve this answer








                New contributor




                thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  1












                  1








                  1







                  SOLVED
                  using properly xshift and yshift with labels and nodes as @marmot says...



                  Here is the improved code:



                  documentclassstandalone
                  usepackagetikz
                  usepackageamsmath

                  tikzset
                  solid node/.style=circle, draw, inner sep=2, fill=black, line width=1pt,
                  hollow node/.style=circle, draw, inner sep=2, line width=1pt ,


                  %child{node(l1)[hollow node, label=below:D]

                  begindocument
                  begintikzpicture[font=footnotesize]
                  tikzset
                  level 1/.style=level distance=15mm,sibling distance=45mm, line width=1pt,
                  level 2/.style=level distance=15mm,sibling distance=30mm,
                  level 3/.style=level distance=15mm,sibling distance=15mm,
                  level 4/.style=level distance=15mm,sibling distance=10mm,


                  node(A)[hollow node,label=above:ALL]
                  child
                  %node(B)[hollow node,label=left:Carbonated Drinks]
                  node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
                  child node(D)[hollow node, label=below:Coke]
                  edge from parent
                  node[solid node, xshift=-1pt, yshift=+3pt, left, label=left:X, at end]
                  node[right]1


                  child node(E)[hollow node, label=below:Pepsi]
                  edge from parent
                  node[left]1
                  node[solid node, rotate=+45pt, right, near start, label=[xshift=-1.0pt, yshift=-9.0pt]right:T]


                  edge from parent
                  node[solid node, rotate=-45, left, near start,label=[xshift=2.0pt, yshift=-7.0pt]left:S]
                  node[solid node, rotate=-45, right, near start, label=[xshift=-2.0pt, yshift=7.0pt]right:M]

                  edge from parent
                  node[right]1


                  child
                  node(C)[hollow node,label=right:Coffee]
                  child
                  node(F)[hollow node, label=below:Mocca]
                  edge from parent
                  node[right]1


                  child
                  node(G)[hollow node, label=below:Nescaffe]
                  edge from parent
                  node[left]1


                  edge from parent
                  node[left]1

                  ;
                  endtikzpicture
                  enddocument


                  I got:



                  enter image description here



                  thanks all @marmot, @ferahfeza






                  share|improve this answer








                  New contributor




                  thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  SOLVED
                  using properly xshift and yshift with labels and nodes as @marmot says...



                  Here is the improved code:



                  documentclassstandalone
                  usepackagetikz
                  usepackageamsmath

                  tikzset
                  solid node/.style=circle, draw, inner sep=2, fill=black, line width=1pt,
                  hollow node/.style=circle, draw, inner sep=2, line width=1pt ,


                  %child{node(l1)[hollow node, label=below:D]

                  begindocument
                  begintikzpicture[font=footnotesize]
                  tikzset
                  level 1/.style=level distance=15mm,sibling distance=45mm, line width=1pt,
                  level 2/.style=level distance=15mm,sibling distance=30mm,
                  level 3/.style=level distance=15mm,sibling distance=15mm,
                  level 4/.style=level distance=15mm,sibling distance=10mm,


                  node(A)[hollow node,label=above:ALL]
                  child
                  %node(B)[hollow node,label=left:Carbonated Drinks]
                  node(B)[hollow node,label=[align=left]left:Carbonated\Drinks]
                  child node(D)[hollow node, label=below:Coke]
                  edge from parent
                  node[solid node, xshift=-1pt, yshift=+3pt, left, label=left:X, at end]
                  node[right]1


                  child node(E)[hollow node, label=below:Pepsi]
                  edge from parent
                  node[left]1
                  node[solid node, rotate=+45pt, right, near start, label=[xshift=-1.0pt, yshift=-9.0pt]right:T]


                  edge from parent
                  node[solid node, rotate=-45, left, near start,label=[xshift=2.0pt, yshift=-7.0pt]left:S]
                  node[solid node, rotate=-45, right, near start, label=[xshift=-2.0pt, yshift=7.0pt]right:M]

                  edge from parent
                  node[right]1


                  child
                  node(C)[hollow node,label=right:Coffee]
                  child
                  node(F)[hollow node, label=below:Mocca]
                  edge from parent
                  node[right]1


                  child
                  node(G)[hollow node, label=below:Nescaffe]
                  edge from parent
                  node[left]1


                  edge from parent
                  node[left]1

                  ;
                  endtikzpicture
                  enddocument


                  I got:



                  enter image description here



                  thanks all @marmot, @ferahfeza







                  share|improve this answer








                  New contributor




                  thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 4 hours ago









                  thecharliexthecharliex

                  235




                  235




                  New contributor




                  thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  thecharliex is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




















                      thecharliex is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      thecharliex is a new contributor. Be nice, and check out our Code of Conduct.












                      thecharliex is a new contributor. Be nice, and check out our Code of Conduct.











                      thecharliex is a new contributor. Be nice, and check out our Code of Conduct.














                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478785%2fi-need-help-with-tikz-tree-node-and-label-offsets-and-inclination%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

                      Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

                      Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

                      Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»