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

Why is a very small peak with larger m/z not considered to be the molecular ion?

MySQL importing CSV files really slow

Are there historical instances of the capital of a colonising country being temporarily or permanently shifted to one of its colonies?

I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?

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

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

What do *foreign films* mean for an American?

What will happen if my luggage gets delayed?

Rationale to prefer local variables over instance variables?

Are all players supposed to be able to see each others' character sheets?

Shifting between bemols and diesis in the key signature

Can I negotiate a patent idea for a raise, under French law?

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

What is Tony Stark injecting into himself in Iron Man 3?

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

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

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

Doesn't allowing a user mode program to access kernel space memory and execute the IN and OUT instructions defeat the purpose of having CPU modes?

Recommendation letter by significant other if you worked with them professionally?

Making a kiddush for a girl that has hard time finding shidduch

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

Confusion about Complex Continued Fraction

Power Strip for Europe

How can I find out information about a service?



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
    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
    4 hours ago











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

    – egreg
    3 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
    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
    4 hours ago











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

    – egreg
    3 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 5 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
    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
    4 hours ago











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

    – egreg
    3 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
    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
    4 hours ago











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

    – egreg
    3 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
5 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
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






[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
4 hours ago





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

– ferahfeza
4 hours ago













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

– egreg
3 hours ago





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

– egreg
3 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 4 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

                      Nidaros erkebispedøme

                      Birsay

                      Was Woodrow Wilson really a Liberal?Was World War I a war of liberals against authoritarians?Founding Fathers...