Arrow and label positing in a .pic using tikzRotate a node but not its content: the case of the ellipse...

Interpretation of linear regression interaction term plot

Was it really inappropriate to write a pull request for the company I interviewed with?

ESPP--any reason not to go all in?

Is divide-by-zero a security vulnerability?

How does learning spells work when leveling a multiclass character?

How does a sound wave propagate?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

Why is there an extra space when I type "ls" on the Desktop?

How to educate team mate to take screenshots for bugs with out unwanted stuff

Use Mercury as quenching liquid for swords?

How to make sure I'm assertive enough in contact with subordinates?

An Undercover Army

How to install "rounded" brake pads

Is there a logarithm base for which the logarithm becomes an identity function?

Issue with units for a rocket nozzle throat area problem

After Brexit, will the EU recognize British passports that are valid for more than ten years?

Giving a talk in my old university, how prominently should I tell students my salary?

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

How can I portion out frozen cookie dough?

How would an energy-based "projectile" blow up a spaceship?

What do you call someone who likes to pick fights?

Why restrict private health insurance?

Boss Telling direct supervisor I snitched

PTIJ: Sport in the Torah



Arrow and label positing in a .pic using tikz


Rotate a node but not its content: the case of the ellipse decorationTikz: Draw simple shortened curved line between two coordinates in tikzHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeTikZ: Drawing an arc from an intersection to an intersectionAdjusting edge alignment and positioning of fitted nodeDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of them“Dividers” with TikZBorder-to-border placement of a tikz-pic













1















I am trying to draw a figure, which repeatedly contains a similar type of pictures. Hence I am using .pic provided by tikz in the following way:



documentclass[tikz, border=2px]{standalone}
usetikzlibrary{arrows.meta, bending, shapes.misc, shapes.geometric}

% define colors and other constants
colorlet{line color}{black!30}
defline thickness{1pt}

% define primitive shapes for the drawing
tikzset{
line/.style={
-, draw=line color, line width=line thickness},
z plus joint/.pic={
draw[black, line width=line thickness, fill=gray!50] (0,0)
circle (0.5);
draw[black, line width=line thickness, fill=white] (0,0) circle (0.3);
draw[line width=2pt, red, -{Triangle[bend, length=6pt, width=8pt]}]
(270:0.4) arc (270:150:0.4);
draw[latex-,blue, shorten <=2pt] (-0.5, 0.5) -- ++ (-0.5, 0.5)
node[above=2pt, black]{#1};
},
z minus joint/.pic={
pic[yscale=-1, rotate=180] {z plus joint=#1};},
}


begin{document}
begin{tikzpicture}[node distance=2cm]
path[line] (0, 0) pic {z plus joint=1} --
(2, 0) pic {z minus joint=3} --
(4, 0) pic {z minus joint=2} --
(4, 2) pic {z plus joint=4} --
(4, 4) pic {z minus joint=6};
end{tikzpicture}
end{document}


Please see below the generated figure:



enter image description here



I need the following two types of orientation for arrows:




  • Left side titled arrow

  • Right side titled arrow


I am looking for a way to provide an extra argument to the pic which can decide the orientation of the arrow. For example, see the following pseudo code:



begin{tikzpicture}[node distance=2cm]
path[line] (0, 0) pic {z plus joint={1}{right}} --
(2, 0) pic {z minus joint={3}{right}} --
(4, 0) pic {z minus joint={2}{left}} --
(4, 2) pic {z plus joint={4}{left}} --
(4, 4) pic {z minus joint={6}{left}};
end{tikzpicture}


PS: Since the orientation has only two possible values, i.e., left and right, we can have left as default









share



























    1















    I am trying to draw a figure, which repeatedly contains a similar type of pictures. Hence I am using .pic provided by tikz in the following way:



    documentclass[tikz, border=2px]{standalone}
    usetikzlibrary{arrows.meta, bending, shapes.misc, shapes.geometric}

    % define colors and other constants
    colorlet{line color}{black!30}
    defline thickness{1pt}

    % define primitive shapes for the drawing
    tikzset{
    line/.style={
    -, draw=line color, line width=line thickness},
    z plus joint/.pic={
    draw[black, line width=line thickness, fill=gray!50] (0,0)
    circle (0.5);
    draw[black, line width=line thickness, fill=white] (0,0) circle (0.3);
    draw[line width=2pt, red, -{Triangle[bend, length=6pt, width=8pt]}]
    (270:0.4) arc (270:150:0.4);
    draw[latex-,blue, shorten <=2pt] (-0.5, 0.5) -- ++ (-0.5, 0.5)
    node[above=2pt, black]{#1};
    },
    z minus joint/.pic={
    pic[yscale=-1, rotate=180] {z plus joint=#1};},
    }


    begin{document}
    begin{tikzpicture}[node distance=2cm]
    path[line] (0, 0) pic {z plus joint=1} --
    (2, 0) pic {z minus joint=3} --
    (4, 0) pic {z minus joint=2} --
    (4, 2) pic {z plus joint=4} --
    (4, 4) pic {z minus joint=6};
    end{tikzpicture}
    end{document}


    Please see below the generated figure:



    enter image description here



    I need the following two types of orientation for arrows:




    • Left side titled arrow

    • Right side titled arrow


    I am looking for a way to provide an extra argument to the pic which can decide the orientation of the arrow. For example, see the following pseudo code:



    begin{tikzpicture}[node distance=2cm]
    path[line] (0, 0) pic {z plus joint={1}{right}} --
    (2, 0) pic {z minus joint={3}{right}} --
    (4, 0) pic {z minus joint={2}{left}} --
    (4, 2) pic {z plus joint={4}{left}} --
    (4, 4) pic {z minus joint={6}{left}};
    end{tikzpicture}


    PS: Since the orientation has only two possible values, i.e., left and right, we can have left as default









    share

























      1












      1








      1








      I am trying to draw a figure, which repeatedly contains a similar type of pictures. Hence I am using .pic provided by tikz in the following way:



      documentclass[tikz, border=2px]{standalone}
      usetikzlibrary{arrows.meta, bending, shapes.misc, shapes.geometric}

      % define colors and other constants
      colorlet{line color}{black!30}
      defline thickness{1pt}

      % define primitive shapes for the drawing
      tikzset{
      line/.style={
      -, draw=line color, line width=line thickness},
      z plus joint/.pic={
      draw[black, line width=line thickness, fill=gray!50] (0,0)
      circle (0.5);
      draw[black, line width=line thickness, fill=white] (0,0) circle (0.3);
      draw[line width=2pt, red, -{Triangle[bend, length=6pt, width=8pt]}]
      (270:0.4) arc (270:150:0.4);
      draw[latex-,blue, shorten <=2pt] (-0.5, 0.5) -- ++ (-0.5, 0.5)
      node[above=2pt, black]{#1};
      },
      z minus joint/.pic={
      pic[yscale=-1, rotate=180] {z plus joint=#1};},
      }


      begin{document}
      begin{tikzpicture}[node distance=2cm]
      path[line] (0, 0) pic {z plus joint=1} --
      (2, 0) pic {z minus joint=3} --
      (4, 0) pic {z minus joint=2} --
      (4, 2) pic {z plus joint=4} --
      (4, 4) pic {z minus joint=6};
      end{tikzpicture}
      end{document}


      Please see below the generated figure:



      enter image description here



      I need the following two types of orientation for arrows:




      • Left side titled arrow

      • Right side titled arrow


      I am looking for a way to provide an extra argument to the pic which can decide the orientation of the arrow. For example, see the following pseudo code:



      begin{tikzpicture}[node distance=2cm]
      path[line] (0, 0) pic {z plus joint={1}{right}} --
      (2, 0) pic {z minus joint={3}{right}} --
      (4, 0) pic {z minus joint={2}{left}} --
      (4, 2) pic {z plus joint={4}{left}} --
      (4, 4) pic {z minus joint={6}{left}};
      end{tikzpicture}


      PS: Since the orientation has only two possible values, i.e., left and right, we can have left as default









      share














      I am trying to draw a figure, which repeatedly contains a similar type of pictures. Hence I am using .pic provided by tikz in the following way:



      documentclass[tikz, border=2px]{standalone}
      usetikzlibrary{arrows.meta, bending, shapes.misc, shapes.geometric}

      % define colors and other constants
      colorlet{line color}{black!30}
      defline thickness{1pt}

      % define primitive shapes for the drawing
      tikzset{
      line/.style={
      -, draw=line color, line width=line thickness},
      z plus joint/.pic={
      draw[black, line width=line thickness, fill=gray!50] (0,0)
      circle (0.5);
      draw[black, line width=line thickness, fill=white] (0,0) circle (0.3);
      draw[line width=2pt, red, -{Triangle[bend, length=6pt, width=8pt]}]
      (270:0.4) arc (270:150:0.4);
      draw[latex-,blue, shorten <=2pt] (-0.5, 0.5) -- ++ (-0.5, 0.5)
      node[above=2pt, black]{#1};
      },
      z minus joint/.pic={
      pic[yscale=-1, rotate=180] {z plus joint=#1};},
      }


      begin{document}
      begin{tikzpicture}[node distance=2cm]
      path[line] (0, 0) pic {z plus joint=1} --
      (2, 0) pic {z minus joint=3} --
      (4, 0) pic {z minus joint=2} --
      (4, 2) pic {z plus joint=4} --
      (4, 4) pic {z minus joint=6};
      end{tikzpicture}
      end{document}


      Please see below the generated figure:



      enter image description here



      I need the following two types of orientation for arrows:




      • Left side titled arrow

      • Right side titled arrow


      I am looking for a way to provide an extra argument to the pic which can decide the orientation of the arrow. For example, see the following pseudo code:



      begin{tikzpicture}[node distance=2cm]
      path[line] (0, 0) pic {z plus joint={1}{right}} --
      (2, 0) pic {z minus joint={3}{right}} --
      (4, 0) pic {z minus joint={2}{left}} --
      (4, 2) pic {z plus joint={4}{left}} --
      (4, 4) pic {z minus joint={6}{left}};
      end{tikzpicture}


      PS: Since the orientation has only two possible values, i.e., left and right, we can have left as default







      tikz-pgf





      share












      share










      share



      share










      asked 2 mins ago









      Ravi JoshiRavi Joshi

      6771816




      6771816






















          0






          active

          oldest

          votes











          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%2f478537%2farrow-and-label-positing-in-a-pic-using-tikz%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f478537%2farrow-and-label-positing-in-a-pic-using-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

          El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

          Castillo d'Acher Características Menú de navegación

          Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...