Extending anchors in TikZAdd more anchors to standard TikZ nodesHow to add ticks in a circle in TikZRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeComputing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?Help understanding the coordinate system used in tikzTikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themNode anchor centre of line

Prime joint compound before latex paint?

Need help identifying/translating a plaque in Tangier, Morocco

Is Social Media Science Fiction?

Symmetry in quantum mechanics

Why do we use polarized capacitors?

Does light intensity oscillate really fast since it is a wave?

Why is the design of haulage companies so “special”?

How to deal with fear of taking dependencies

How to answer pointed "are you quitting" questioning when I don't want them to suspect

COUNT(*) or MAX(id) - which is faster?

Is this food a bread or a loaf?

What to wear for invited talk in Canada

OOB SharePoint Work Flow question: Difference between Workflow Task and Tasks (New)

What is the meaning of "of trouble" in the following sentence?

How to make payment on the internet without leaving a money trail?

Can one use the reaction spell from the War Caster feat to cast Bigby's Hand?

Is "plugging out" electronic devices an American expression?

Springs with some finite mass

"listening to me about as much as you're listening to this pole here"

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

What does the Japanese word "Shalaku" mean?

Unbreakable Formation vs. Cry of the Carnarium

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

Extreme, but not acceptable situation and I can't start the work tomorrow morning



Extending anchors in TikZ


Add more anchors to standard TikZ nodesHow to add ticks in a circle in TikZRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeComputing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?Help understanding the coordinate system used in tikzTikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themNode anchor centre of line













10















The following are the standard anchors available in TikZ (to the best of my knowledge):



enter image description here



documentclassarticle
usepackagetikz
usetikzlibrarypositioning

tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm


tikzsetsquarenode/.style =
shape = rectangle,
draw = black,
minimum height = 10cm,
minimum width = 10cm


begindocument
begintikzpicture[node distance=2cm]
node (a) at (0,0) [squarenode] ;
node[label=a.center] at (a.center) [dot] ;
node[label=a.north] at (a.north) [dot] ;
node[label=a.south] at (a.south) [dot] ;
node[label=a.east] at (a.east) [dot] ;
node[label=a.west] at (a.west) [dot] ;
node[label=a.north east] at (a.north east) [dot] ;
node[label=a.north west] at (a.north west) [dot] ;
node[label=a.south east] at (a.south east) [dot] ;
node[label=a.south west] at (a.south west) [dot] ;
endtikzpicture
enddocument


Now, how do I locate the following points:



  1. Point between a.south and a.south west (midpoint and normal point - any point on the line)

  2. Point between a.south west and a.center (midpoint and normal point - any point on the line)









share|improve this question

















  • 1





    If you want to add new anchors to an existing shape, see tex.stackexchange.com/q/14769/86

    – Loop Space
    Mar 29 at 6:59











  • There are also .base, .base east, .base west and all the .<angle> for the standard rectangle shape.

    – Kpym
    Mar 29 at 10:17
















10















The following are the standard anchors available in TikZ (to the best of my knowledge):



enter image description here



documentclassarticle
usepackagetikz
usetikzlibrarypositioning

tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm


tikzsetsquarenode/.style =
shape = rectangle,
draw = black,
minimum height = 10cm,
minimum width = 10cm


begindocument
begintikzpicture[node distance=2cm]
node (a) at (0,0) [squarenode] ;
node[label=a.center] at (a.center) [dot] ;
node[label=a.north] at (a.north) [dot] ;
node[label=a.south] at (a.south) [dot] ;
node[label=a.east] at (a.east) [dot] ;
node[label=a.west] at (a.west) [dot] ;
node[label=a.north east] at (a.north east) [dot] ;
node[label=a.north west] at (a.north west) [dot] ;
node[label=a.south east] at (a.south east) [dot] ;
node[label=a.south west] at (a.south west) [dot] ;
endtikzpicture
enddocument


Now, how do I locate the following points:



  1. Point between a.south and a.south west (midpoint and normal point - any point on the line)

  2. Point between a.south west and a.center (midpoint and normal point - any point on the line)









share|improve this question

















  • 1





    If you want to add new anchors to an existing shape, see tex.stackexchange.com/q/14769/86

    – Loop Space
    Mar 29 at 6:59











  • There are also .base, .base east, .base west and all the .<angle> for the standard rectangle shape.

    – Kpym
    Mar 29 at 10:17














10












10








10


0






The following are the standard anchors available in TikZ (to the best of my knowledge):



enter image description here



documentclassarticle
usepackagetikz
usetikzlibrarypositioning

tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm


tikzsetsquarenode/.style =
shape = rectangle,
draw = black,
minimum height = 10cm,
minimum width = 10cm


begindocument
begintikzpicture[node distance=2cm]
node (a) at (0,0) [squarenode] ;
node[label=a.center] at (a.center) [dot] ;
node[label=a.north] at (a.north) [dot] ;
node[label=a.south] at (a.south) [dot] ;
node[label=a.east] at (a.east) [dot] ;
node[label=a.west] at (a.west) [dot] ;
node[label=a.north east] at (a.north east) [dot] ;
node[label=a.north west] at (a.north west) [dot] ;
node[label=a.south east] at (a.south east) [dot] ;
node[label=a.south west] at (a.south west) [dot] ;
endtikzpicture
enddocument


Now, how do I locate the following points:



  1. Point between a.south and a.south west (midpoint and normal point - any point on the line)

  2. Point between a.south west and a.center (midpoint and normal point - any point on the line)









share|improve this question














The following are the standard anchors available in TikZ (to the best of my knowledge):



enter image description here



documentclassarticle
usepackagetikz
usetikzlibrarypositioning

tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm


tikzsetsquarenode/.style =
shape = rectangle,
draw = black,
minimum height = 10cm,
minimum width = 10cm


begindocument
begintikzpicture[node distance=2cm]
node (a) at (0,0) [squarenode] ;
node[label=a.center] at (a.center) [dot] ;
node[label=a.north] at (a.north) [dot] ;
node[label=a.south] at (a.south) [dot] ;
node[label=a.east] at (a.east) [dot] ;
node[label=a.west] at (a.west) [dot] ;
node[label=a.north east] at (a.north east) [dot] ;
node[label=a.north west] at (a.north west) [dot] ;
node[label=a.south east] at (a.south east) [dot] ;
node[label=a.south west] at (a.south west) [dot] ;
endtikzpicture
enddocument


Now, how do I locate the following points:



  1. Point between a.south and a.south west (midpoint and normal point - any point on the line)

  2. Point between a.south west and a.center (midpoint and normal point - any point on the line)






tikz-pgf positioning






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 29 at 6:14









subham sonisubham soni

4,97683187




4,97683187







  • 1





    If you want to add new anchors to an existing shape, see tex.stackexchange.com/q/14769/86

    – Loop Space
    Mar 29 at 6:59











  • There are also .base, .base east, .base west and all the .<angle> for the standard rectangle shape.

    – Kpym
    Mar 29 at 10:17













  • 1





    If you want to add new anchors to an existing shape, see tex.stackexchange.com/q/14769/86

    – Loop Space
    Mar 29 at 6:59











  • There are also .base, .base east, .base west and all the .<angle> for the standard rectangle shape.

    – Kpym
    Mar 29 at 10:17








1




1





If you want to add new anchors to an existing shape, see tex.stackexchange.com/q/14769/86

– Loop Space
Mar 29 at 6:59





If you want to add new anchors to an existing shape, see tex.stackexchange.com/q/14769/86

– Loop Space
Mar 29 at 6:59













There are also .base, .base east, .base west and all the .<angle> for the standard rectangle shape.

– Kpym
Mar 29 at 10:17






There are also .base, .base east, .base west and all the .<angle> for the standard rectangle shape.

– Kpym
Mar 29 at 10:17











2 Answers
2






active

oldest

votes


















11














You can gan get points on a line between two nodes with coordinate[pos=x], where x is a fraction. so



path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw);


will give you the point in the middle between (a.south west) and (a.south). If you choose x smaller/larger, it will be closer to (a.south west)/(a-mid-sw), and for x=0 or x=1 it will coincide with (a.south west) or (a.south) respectively. Note that x can be negative or larger than 1, in which case the coordinate will be located outside the line connecting the points.



documentclassarticle
usepackagetikz
usetikzlibrarypositioning

tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm


tikzsetsquarenode/.style =
shape = rectangle,
draw = black,
minimum height = 10cm,
minimum width = 10cm


begindocument
begintikzpicture[node distance=2cm]
node (a) at (0,0) [squarenode] ;
node[label=a.center] at (a.center) [dot] ;
node[label=a.north] at (a.north) [dot] ;
node[label=a.south] at (a.south) [dot] ;
node[label=a.east] at (a.east) [dot] ;
node[label=a.west] at (a.west) [dot] ;
node[label=a.north east] at (a.north east) [dot] ;
node[label=a.north west] at (a.north west) [dot] ;
node[label=a.south east] at (a.south east) [dot] ;
node[label=a.south west] at (a.south west) [dot] ;
path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw)
(a.south west) -- (a.center) coordinate[pos=0.3] (a-diag);
node[label=a-mid-sw] at (a-mid-sw) [dot] ;
node[label=a-diag] at (a-diag) [dot] ;
endtikzpicture
enddocument


enter image description here



The calc library also allows you to mix coordinates. And you can get points on the boundary using a.angle, where the angle has to be specified in degrees. a.90, for instance, is the same as a.north, a.0 the same as a.east but in general a.45 and a.north east do not have to coincide. (Here they do because the shape is a square.) If you want to have additional anchors, you may define a new shape.






share|improve this answer
































    6














    Another way using calc library (node labels are inspired by marmot's answer)



    documentclass[tikz]standalone
    usetikzlibrarypositioning,calc

    tikzsetdot/.style =
    shape = circle,
    draw = black,
    fill = black,
    minimum size = 0.2cm


    tikzsetsquarenode/.style =
    shape = rectangle,
    draw = black,
    minimum height = 10cm,
    minimum width = 10cm


    begindocument
    begintikzpicture[node distance=2cm]
    node (a) at (0,0) [squarenode] ;
    node[label=a.center] at (a.center) [dot] ;
    node[label=a.north] at (a.north) [dot] ;
    node[label=a.south] at (a.south) [dot] ;
    node[label=a.east] at (a.east) [dot] ;
    node[label=a.west] at (a.west) [dot] ;
    node[label=a.north east] at (a.north east) [dot] ;
    node[label=a.north west] at (a.north west) [dot] ;
    node[label=a.south east] at (a.south east) [dot] ;
    node[label=a.south west] at (a.south west) [dot] ;
    node[label=a-mid-sw] at ($(a.south west)!.5!(a.south)$) [dot] ;
    node[label=a-diag] at ($(a.south west)!.3!(a.center)$) [dot] ;
    endtikzpicture
    enddocument


    enter image description here



    In case you are using this a lot, I suggest using a macro



    documentclass[tikz]standalone
    usetikzlibrarypositioning,calc

    tikzsetdot/.style =
    shape = circle,
    draw = black,
    fill = black,
    minimum size = 0.2cm


    tikzsetsquarenode/.style =
    shape = rectangle,
    draw = black,
    minimum height = 10cm,
    minimum width = 10cm

    deffindmid#1#2#3($(#2)!#1!(#3)$)
    begindocument
    begintikzpicture[node distance=2cm]
    node (a) at (0,0) [squarenode] ;
    node[label=a.center] at (a.center) [dot] ;
    node[label=a.north] at (a.north) [dot] ;
    node[label=a.south] at (a.south) [dot] ;
    node[label=a.east] at (a.east) [dot] ;
    node[label=a.west] at (a.west) [dot] ;
    node[label=a.north east] at (a.north east) [dot] ;
    node[label=a.north west] at (a.north west) [dot] ;
    node[label=a.south east] at (a.south east) [dot] ;
    node[label=a.south west] at (a.south west) [dot] ;
    node[label=a-mid-sw] at findmid0.5a.south westa.south [dot] ;
    node[label=a-diag] at findmid0.3a.south westa.center [dot] ;
    endtikzpicture
    enddocument


    (the same output as above)






    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%2f482057%2fextending-anchors-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









      11














      You can gan get points on a line between two nodes with coordinate[pos=x], where x is a fraction. so



      path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw);


      will give you the point in the middle between (a.south west) and (a.south). If you choose x smaller/larger, it will be closer to (a.south west)/(a-mid-sw), and for x=0 or x=1 it will coincide with (a.south west) or (a.south) respectively. Note that x can be negative or larger than 1, in which case the coordinate will be located outside the line connecting the points.



      documentclassarticle
      usepackagetikz
      usetikzlibrarypositioning

      tikzsetdot/.style =
      shape = circle,
      draw = black,
      fill = black,
      minimum size = 0.2cm


      tikzsetsquarenode/.style =
      shape = rectangle,
      draw = black,
      minimum height = 10cm,
      minimum width = 10cm


      begindocument
      begintikzpicture[node distance=2cm]
      node (a) at (0,0) [squarenode] ;
      node[label=a.center] at (a.center) [dot] ;
      node[label=a.north] at (a.north) [dot] ;
      node[label=a.south] at (a.south) [dot] ;
      node[label=a.east] at (a.east) [dot] ;
      node[label=a.west] at (a.west) [dot] ;
      node[label=a.north east] at (a.north east) [dot] ;
      node[label=a.north west] at (a.north west) [dot] ;
      node[label=a.south east] at (a.south east) [dot] ;
      node[label=a.south west] at (a.south west) [dot] ;
      path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw)
      (a.south west) -- (a.center) coordinate[pos=0.3] (a-diag);
      node[label=a-mid-sw] at (a-mid-sw) [dot] ;
      node[label=a-diag] at (a-diag) [dot] ;
      endtikzpicture
      enddocument


      enter image description here



      The calc library also allows you to mix coordinates. And you can get points on the boundary using a.angle, where the angle has to be specified in degrees. a.90, for instance, is the same as a.north, a.0 the same as a.east but in general a.45 and a.north east do not have to coincide. (Here they do because the shape is a square.) If you want to have additional anchors, you may define a new shape.






      share|improve this answer





























        11














        You can gan get points on a line between two nodes with coordinate[pos=x], where x is a fraction. so



        path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw);


        will give you the point in the middle between (a.south west) and (a.south). If you choose x smaller/larger, it will be closer to (a.south west)/(a-mid-sw), and for x=0 or x=1 it will coincide with (a.south west) or (a.south) respectively. Note that x can be negative or larger than 1, in which case the coordinate will be located outside the line connecting the points.



        documentclassarticle
        usepackagetikz
        usetikzlibrarypositioning

        tikzsetdot/.style =
        shape = circle,
        draw = black,
        fill = black,
        minimum size = 0.2cm


        tikzsetsquarenode/.style =
        shape = rectangle,
        draw = black,
        minimum height = 10cm,
        minimum width = 10cm


        begindocument
        begintikzpicture[node distance=2cm]
        node (a) at (0,0) [squarenode] ;
        node[label=a.center] at (a.center) [dot] ;
        node[label=a.north] at (a.north) [dot] ;
        node[label=a.south] at (a.south) [dot] ;
        node[label=a.east] at (a.east) [dot] ;
        node[label=a.west] at (a.west) [dot] ;
        node[label=a.north east] at (a.north east) [dot] ;
        node[label=a.north west] at (a.north west) [dot] ;
        node[label=a.south east] at (a.south east) [dot] ;
        node[label=a.south west] at (a.south west) [dot] ;
        path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw)
        (a.south west) -- (a.center) coordinate[pos=0.3] (a-diag);
        node[label=a-mid-sw] at (a-mid-sw) [dot] ;
        node[label=a-diag] at (a-diag) [dot] ;
        endtikzpicture
        enddocument


        enter image description here



        The calc library also allows you to mix coordinates. And you can get points on the boundary using a.angle, where the angle has to be specified in degrees. a.90, for instance, is the same as a.north, a.0 the same as a.east but in general a.45 and a.north east do not have to coincide. (Here they do because the shape is a square.) If you want to have additional anchors, you may define a new shape.






        share|improve this answer



























          11












          11








          11







          You can gan get points on a line between two nodes with coordinate[pos=x], where x is a fraction. so



          path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw);


          will give you the point in the middle between (a.south west) and (a.south). If you choose x smaller/larger, it will be closer to (a.south west)/(a-mid-sw), and for x=0 or x=1 it will coincide with (a.south west) or (a.south) respectively. Note that x can be negative or larger than 1, in which case the coordinate will be located outside the line connecting the points.



          documentclassarticle
          usepackagetikz
          usetikzlibrarypositioning

          tikzsetdot/.style =
          shape = circle,
          draw = black,
          fill = black,
          minimum size = 0.2cm


          tikzsetsquarenode/.style =
          shape = rectangle,
          draw = black,
          minimum height = 10cm,
          minimum width = 10cm


          begindocument
          begintikzpicture[node distance=2cm]
          node (a) at (0,0) [squarenode] ;
          node[label=a.center] at (a.center) [dot] ;
          node[label=a.north] at (a.north) [dot] ;
          node[label=a.south] at (a.south) [dot] ;
          node[label=a.east] at (a.east) [dot] ;
          node[label=a.west] at (a.west) [dot] ;
          node[label=a.north east] at (a.north east) [dot] ;
          node[label=a.north west] at (a.north west) [dot] ;
          node[label=a.south east] at (a.south east) [dot] ;
          node[label=a.south west] at (a.south west) [dot] ;
          path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw)
          (a.south west) -- (a.center) coordinate[pos=0.3] (a-diag);
          node[label=a-mid-sw] at (a-mid-sw) [dot] ;
          node[label=a-diag] at (a-diag) [dot] ;
          endtikzpicture
          enddocument


          enter image description here



          The calc library also allows you to mix coordinates. And you can get points on the boundary using a.angle, where the angle has to be specified in degrees. a.90, for instance, is the same as a.north, a.0 the same as a.east but in general a.45 and a.north east do not have to coincide. (Here they do because the shape is a square.) If you want to have additional anchors, you may define a new shape.






          share|improve this answer















          You can gan get points on a line between two nodes with coordinate[pos=x], where x is a fraction. so



          path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw);


          will give you the point in the middle between (a.south west) and (a.south). If you choose x smaller/larger, it will be closer to (a.south west)/(a-mid-sw), and for x=0 or x=1 it will coincide with (a.south west) or (a.south) respectively. Note that x can be negative or larger than 1, in which case the coordinate will be located outside the line connecting the points.



          documentclassarticle
          usepackagetikz
          usetikzlibrarypositioning

          tikzsetdot/.style =
          shape = circle,
          draw = black,
          fill = black,
          minimum size = 0.2cm


          tikzsetsquarenode/.style =
          shape = rectangle,
          draw = black,
          minimum height = 10cm,
          minimum width = 10cm


          begindocument
          begintikzpicture[node distance=2cm]
          node (a) at (0,0) [squarenode] ;
          node[label=a.center] at (a.center) [dot] ;
          node[label=a.north] at (a.north) [dot] ;
          node[label=a.south] at (a.south) [dot] ;
          node[label=a.east] at (a.east) [dot] ;
          node[label=a.west] at (a.west) [dot] ;
          node[label=a.north east] at (a.north east) [dot] ;
          node[label=a.north west] at (a.north west) [dot] ;
          node[label=a.south east] at (a.south east) [dot] ;
          node[label=a.south west] at (a.south west) [dot] ;
          path (a.south west) -- (a.south) coordinate[pos=0.5] (a-mid-sw)
          (a.south west) -- (a.center) coordinate[pos=0.3] (a-diag);
          node[label=a-mid-sw] at (a-mid-sw) [dot] ;
          node[label=a-diag] at (a-diag) [dot] ;
          endtikzpicture
          enddocument


          enter image description here



          The calc library also allows you to mix coordinates. And you can get points on the boundary using a.angle, where the angle has to be specified in degrees. a.90, for instance, is the same as a.north, a.0 the same as a.east but in general a.45 and a.north east do not have to coincide. (Here they do because the shape is a square.) If you want to have additional anchors, you may define a new shape.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 29 at 6:28

























          answered Mar 29 at 6:20









          marmotmarmot

          116k5147278




          116k5147278





















              6














              Another way using calc library (node labels are inspired by marmot's answer)



              documentclass[tikz]standalone
              usetikzlibrarypositioning,calc

              tikzsetdot/.style =
              shape = circle,
              draw = black,
              fill = black,
              minimum size = 0.2cm


              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 10cm,
              minimum width = 10cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] ;
              node[label=a.center] at (a.center) [dot] ;
              node[label=a.north] at (a.north) [dot] ;
              node[label=a.south] at (a.south) [dot] ;
              node[label=a.east] at (a.east) [dot] ;
              node[label=a.west] at (a.west) [dot] ;
              node[label=a.north east] at (a.north east) [dot] ;
              node[label=a.north west] at (a.north west) [dot] ;
              node[label=a.south east] at (a.south east) [dot] ;
              node[label=a.south west] at (a.south west) [dot] ;
              node[label=a-mid-sw] at ($(a.south west)!.5!(a.south)$) [dot] ;
              node[label=a-diag] at ($(a.south west)!.3!(a.center)$) [dot] ;
              endtikzpicture
              enddocument


              enter image description here



              In case you are using this a lot, I suggest using a macro



              documentclass[tikz]standalone
              usetikzlibrarypositioning,calc

              tikzsetdot/.style =
              shape = circle,
              draw = black,
              fill = black,
              minimum size = 0.2cm


              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 10cm,
              minimum width = 10cm

              deffindmid#1#2#3($(#2)!#1!(#3)$)
              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] ;
              node[label=a.center] at (a.center) [dot] ;
              node[label=a.north] at (a.north) [dot] ;
              node[label=a.south] at (a.south) [dot] ;
              node[label=a.east] at (a.east) [dot] ;
              node[label=a.west] at (a.west) [dot] ;
              node[label=a.north east] at (a.north east) [dot] ;
              node[label=a.north west] at (a.north west) [dot] ;
              node[label=a.south east] at (a.south east) [dot] ;
              node[label=a.south west] at (a.south west) [dot] ;
              node[label=a-mid-sw] at findmid0.5a.south westa.south [dot] ;
              node[label=a-diag] at findmid0.3a.south westa.center [dot] ;
              endtikzpicture
              enddocument


              (the same output as above)






              share|improve this answer



























                6














                Another way using calc library (node labels are inspired by marmot's answer)



                documentclass[tikz]standalone
                usetikzlibrarypositioning,calc

                tikzsetdot/.style =
                shape = circle,
                draw = black,
                fill = black,
                minimum size = 0.2cm


                tikzsetsquarenode/.style =
                shape = rectangle,
                draw = black,
                minimum height = 10cm,
                minimum width = 10cm


                begindocument
                begintikzpicture[node distance=2cm]
                node (a) at (0,0) [squarenode] ;
                node[label=a.center] at (a.center) [dot] ;
                node[label=a.north] at (a.north) [dot] ;
                node[label=a.south] at (a.south) [dot] ;
                node[label=a.east] at (a.east) [dot] ;
                node[label=a.west] at (a.west) [dot] ;
                node[label=a.north east] at (a.north east) [dot] ;
                node[label=a.north west] at (a.north west) [dot] ;
                node[label=a.south east] at (a.south east) [dot] ;
                node[label=a.south west] at (a.south west) [dot] ;
                node[label=a-mid-sw] at ($(a.south west)!.5!(a.south)$) [dot] ;
                node[label=a-diag] at ($(a.south west)!.3!(a.center)$) [dot] ;
                endtikzpicture
                enddocument


                enter image description here



                In case you are using this a lot, I suggest using a macro



                documentclass[tikz]standalone
                usetikzlibrarypositioning,calc

                tikzsetdot/.style =
                shape = circle,
                draw = black,
                fill = black,
                minimum size = 0.2cm


                tikzsetsquarenode/.style =
                shape = rectangle,
                draw = black,
                minimum height = 10cm,
                minimum width = 10cm

                deffindmid#1#2#3($(#2)!#1!(#3)$)
                begindocument
                begintikzpicture[node distance=2cm]
                node (a) at (0,0) [squarenode] ;
                node[label=a.center] at (a.center) [dot] ;
                node[label=a.north] at (a.north) [dot] ;
                node[label=a.south] at (a.south) [dot] ;
                node[label=a.east] at (a.east) [dot] ;
                node[label=a.west] at (a.west) [dot] ;
                node[label=a.north east] at (a.north east) [dot] ;
                node[label=a.north west] at (a.north west) [dot] ;
                node[label=a.south east] at (a.south east) [dot] ;
                node[label=a.south west] at (a.south west) [dot] ;
                node[label=a-mid-sw] at findmid0.5a.south westa.south [dot] ;
                node[label=a-diag] at findmid0.3a.south westa.center [dot] ;
                endtikzpicture
                enddocument


                (the same output as above)






                share|improve this answer

























                  6












                  6








                  6







                  Another way using calc library (node labels are inspired by marmot's answer)



                  documentclass[tikz]standalone
                  usetikzlibrarypositioning,calc

                  tikzsetdot/.style =
                  shape = circle,
                  draw = black,
                  fill = black,
                  minimum size = 0.2cm


                  tikzsetsquarenode/.style =
                  shape = rectangle,
                  draw = black,
                  minimum height = 10cm,
                  minimum width = 10cm


                  begindocument
                  begintikzpicture[node distance=2cm]
                  node (a) at (0,0) [squarenode] ;
                  node[label=a.center] at (a.center) [dot] ;
                  node[label=a.north] at (a.north) [dot] ;
                  node[label=a.south] at (a.south) [dot] ;
                  node[label=a.east] at (a.east) [dot] ;
                  node[label=a.west] at (a.west) [dot] ;
                  node[label=a.north east] at (a.north east) [dot] ;
                  node[label=a.north west] at (a.north west) [dot] ;
                  node[label=a.south east] at (a.south east) [dot] ;
                  node[label=a.south west] at (a.south west) [dot] ;
                  node[label=a-mid-sw] at ($(a.south west)!.5!(a.south)$) [dot] ;
                  node[label=a-diag] at ($(a.south west)!.3!(a.center)$) [dot] ;
                  endtikzpicture
                  enddocument


                  enter image description here



                  In case you are using this a lot, I suggest using a macro



                  documentclass[tikz]standalone
                  usetikzlibrarypositioning,calc

                  tikzsetdot/.style =
                  shape = circle,
                  draw = black,
                  fill = black,
                  minimum size = 0.2cm


                  tikzsetsquarenode/.style =
                  shape = rectangle,
                  draw = black,
                  minimum height = 10cm,
                  minimum width = 10cm

                  deffindmid#1#2#3($(#2)!#1!(#3)$)
                  begindocument
                  begintikzpicture[node distance=2cm]
                  node (a) at (0,0) [squarenode] ;
                  node[label=a.center] at (a.center) [dot] ;
                  node[label=a.north] at (a.north) [dot] ;
                  node[label=a.south] at (a.south) [dot] ;
                  node[label=a.east] at (a.east) [dot] ;
                  node[label=a.west] at (a.west) [dot] ;
                  node[label=a.north east] at (a.north east) [dot] ;
                  node[label=a.north west] at (a.north west) [dot] ;
                  node[label=a.south east] at (a.south east) [dot] ;
                  node[label=a.south west] at (a.south west) [dot] ;
                  node[label=a-mid-sw] at findmid0.5a.south westa.south [dot] ;
                  node[label=a-diag] at findmid0.3a.south westa.center [dot] ;
                  endtikzpicture
                  enddocument


                  (the same output as above)






                  share|improve this answer













                  Another way using calc library (node labels are inspired by marmot's answer)



                  documentclass[tikz]standalone
                  usetikzlibrarypositioning,calc

                  tikzsetdot/.style =
                  shape = circle,
                  draw = black,
                  fill = black,
                  minimum size = 0.2cm


                  tikzsetsquarenode/.style =
                  shape = rectangle,
                  draw = black,
                  minimum height = 10cm,
                  minimum width = 10cm


                  begindocument
                  begintikzpicture[node distance=2cm]
                  node (a) at (0,0) [squarenode] ;
                  node[label=a.center] at (a.center) [dot] ;
                  node[label=a.north] at (a.north) [dot] ;
                  node[label=a.south] at (a.south) [dot] ;
                  node[label=a.east] at (a.east) [dot] ;
                  node[label=a.west] at (a.west) [dot] ;
                  node[label=a.north east] at (a.north east) [dot] ;
                  node[label=a.north west] at (a.north west) [dot] ;
                  node[label=a.south east] at (a.south east) [dot] ;
                  node[label=a.south west] at (a.south west) [dot] ;
                  node[label=a-mid-sw] at ($(a.south west)!.5!(a.south)$) [dot] ;
                  node[label=a-diag] at ($(a.south west)!.3!(a.center)$) [dot] ;
                  endtikzpicture
                  enddocument


                  enter image description here



                  In case you are using this a lot, I suggest using a macro



                  documentclass[tikz]standalone
                  usetikzlibrarypositioning,calc

                  tikzsetdot/.style =
                  shape = circle,
                  draw = black,
                  fill = black,
                  minimum size = 0.2cm


                  tikzsetsquarenode/.style =
                  shape = rectangle,
                  draw = black,
                  minimum height = 10cm,
                  minimum width = 10cm

                  deffindmid#1#2#3($(#2)!#1!(#3)$)
                  begindocument
                  begintikzpicture[node distance=2cm]
                  node (a) at (0,0) [squarenode] ;
                  node[label=a.center] at (a.center) [dot] ;
                  node[label=a.north] at (a.north) [dot] ;
                  node[label=a.south] at (a.south) [dot] ;
                  node[label=a.east] at (a.east) [dot] ;
                  node[label=a.west] at (a.west) [dot] ;
                  node[label=a.north east] at (a.north east) [dot] ;
                  node[label=a.north west] at (a.north west) [dot] ;
                  node[label=a.south east] at (a.south east) [dot] ;
                  node[label=a.south west] at (a.south west) [dot] ;
                  node[label=a-mid-sw] at findmid0.5a.south westa.south [dot] ;
                  node[label=a-diag] at findmid0.3a.south westa.center [dot] ;
                  endtikzpicture
                  enddocument


                  (the same output as above)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 29 at 7:28









                  JouleVJouleV

                  11.7k22561




                  11.7k22561



























                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482057%2fextending-anchors-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

                      Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

                      Luettelo Yhdysvaltain laivaston lentotukialuksista Lähteet | Navigointivalikko

                      Gary (muusikko) Sisällysluettelo Historia | Rockin' High | Lähteet | Aiheesta muualla | NavigointivalikkoInfobox OKTuomas "Gary" Keskinen Ancaran kitaristiksiProjekti Rockin' High