Set outline first and fill colors laterTikZ scaling graphic and adjust node position and keep font sizeTikZ/ERD: node (=Entity) label on the insideTikZ: Drawing an arc from an intersection to an intersectionHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Line up nested tikz enviroments or how to get rid of themBeamer tikz uncovering with different fill colorshow to first draw and subsequently fill a given pathTikZ: Rectangle with diagonal fill (two colors)Fill all four quadrants of a circle with different colorsDefining main colors and sub colors

Movie where a boy is transported into the future by an alien spaceship

Does Lightning Network has concept of continuous stream of value?

What happened to all the nuclear material being smuggled after the fall of the USSR?

siunitx error: Invalid numerical input

Does the "6 seconds per round" rule apply to speaking/roleplaying during combat situations?

Etymology of 'calcit(r)are'?

Did thousands of women die every year due to illegal abortions before Roe v. Wade?

Why does VirtualBox crash macOS?

How is it possible that Gollum speaks Westron?

Cause of continuous spectral lines

What LISP compilers and interpreters were available for 8-bit machines?

Through what methods and mechanisms can a multi-material FDM printer operate?

Select items in a list that contain criteria #2

Turing patterns

How do photons get into the eyes?

What do we gain with higher order logics?

Why does Kathryn say this in 12 Monkeys?

Why is the relationship between frequency and pitch exponential?

Implement Homestuck's Catenative Doomsday Dice Cascader

Should I "tell" my exposition or give it through dialogue?

Color text inside lstlisting

When writing an error prompt, should we end the sentence with a exclamation mark or a dot?

When conversion from Integer to Single may lose precision

How do I write "Show, Don't Tell" as an Asperger?



Set outline first and fill colors later


TikZ scaling graphic and adjust node position and keep font sizeTikZ/ERD: node (=Entity) label on the insideTikZ: Drawing an arc from an intersection to an intersectionHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Line up nested tikz enviroments or how to get rid of themBeamer tikz uncovering with different fill colorshow to first draw and subsequently fill a given pathTikZ: Rectangle with diagonal fill (two colors)Fill all four quadrants of a circle with different colorsDefining main colors and sub colors













6















I have the following code



documentclass[border=5mm]standalone
usepackagepgfplots
pgfplotssetcompat=1.10,
ticks=none
usepgfplotslibraryfillbetween
usetikzlibrarybackgrounds,
calc,
patterns

begindocument

begintikzpicture[scale=4, transform shape]
tikzset
myc/.pic= (2, 1) -

path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
endtikzpicture

enddocument


The code defines the outline of a tile in the line starting with tikzset{



I want to put this tile at various places and I want to use different colors to fill the tile. The above code is one of the attempts to get this done, which however does not work.



The output I get is the following:



enter image description here



I very recently learnt about the tikzset command (thanks to TeXstackexchange) and have no understanding of it. Can somebody please help me here and also, if possible, suggest a reference.










share|improve this question


























    6















    I have the following code



    documentclass[border=5mm]standalone
    usepackagepgfplots
    pgfplotssetcompat=1.10,
    ticks=none
    usepgfplotslibraryfillbetween
    usetikzlibrarybackgrounds,
    calc,
    patterns

    begindocument

    begintikzpicture[scale=4, transform shape]
    tikzset
    myc/.pic= (2, 1) -

    path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
    endtikzpicture

    enddocument


    The code defines the outline of a tile in the line starting with tikzset{



    I want to put this tile at various places and I want to use different colors to fill the tile. The above code is one of the attempts to get this done, which however does not work.



    The output I get is the following:



    enter image description here



    I very recently learnt about the tikzset command (thanks to TeXstackexchange) and have no understanding of it. Can somebody please help me here and also, if possible, suggest a reference.










    share|improve this question
























      6












      6








      6








      I have the following code



      documentclass[border=5mm]standalone
      usepackagepgfplots
      pgfplotssetcompat=1.10,
      ticks=none
      usepgfplotslibraryfillbetween
      usetikzlibrarybackgrounds,
      calc,
      patterns

      begindocument

      begintikzpicture[scale=4, transform shape]
      tikzset
      myc/.pic= (2, 1) -

      path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
      endtikzpicture

      enddocument


      The code defines the outline of a tile in the line starting with tikzset{



      I want to put this tile at various places and I want to use different colors to fill the tile. The above code is one of the attempts to get this done, which however does not work.



      The output I get is the following:



      enter image description here



      I very recently learnt about the tikzset command (thanks to TeXstackexchange) and have no understanding of it. Can somebody please help me here and also, if possible, suggest a reference.










      share|improve this question














      I have the following code



      documentclass[border=5mm]standalone
      usepackagepgfplots
      pgfplotssetcompat=1.10,
      ticks=none
      usepgfplotslibraryfillbetween
      usetikzlibrarybackgrounds,
      calc,
      patterns

      begindocument

      begintikzpicture[scale=4, transform shape]
      tikzset
      myc/.pic= (2, 1) -

      path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
      endtikzpicture

      enddocument


      The code defines the outline of a tile in the line starting with tikzset{



      I want to put this tile at various places and I want to use different colors to fill the tile. The above code is one of the attempts to get this done, which however does not work.



      The output I get is the following:



      enter image description here



      I very recently learnt about the tikzset command (thanks to TeXstackexchange) and have no understanding of it. Can somebody please help me here and also, if possible, suggest a reference.







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 20 at 12:39









      caffeinemachinecaffeinemachine

      25917




      25917




















          2 Answers
          2






          active

          oldest

          votes


















          5














          Just use pic actions.



          documentclass[tikz,border=3.14mm]standalone

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic=
          draw[line width=2mm,pic actions] (0, 0) -

          path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer


















          • 2





            @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

            – marmot
            May 20 at 12:54


















          4














          Your pic can have arguments.



          documentclass[border=5mm]standalone
          usepackagepgfplots
          pgfplotssetcompat=1.10,
          ticks=none
          usepgfplotslibraryfillbetween
          usetikzlibrarybackgrounds,
          calc,
          patterns

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic= cycle;


          path (0,0) pic myc=red (1,3) pic myc=green (2,6) pic myc=blue;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer

























          • Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

            – caffeinemachine
            May 20 at 12:51






          • 2





            @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

            – The old JouleV
            May 20 at 12:54












          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%2f491746%2fset-outline-first-and-fill-colors-later%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









          5














          Just use pic actions.



          documentclass[tikz,border=3.14mm]standalone

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic=
          draw[line width=2mm,pic actions] (0, 0) -

          path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer


















          • 2





            @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

            – marmot
            May 20 at 12:54















          5














          Just use pic actions.



          documentclass[tikz,border=3.14mm]standalone

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic=
          draw[line width=2mm,pic actions] (0, 0) -

          path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer


















          • 2





            @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

            – marmot
            May 20 at 12:54













          5












          5








          5







          Just use pic actions.



          documentclass[tikz,border=3.14mm]standalone

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic=
          draw[line width=2mm,pic actions] (0, 0) -

          path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer













          Just use pic actions.



          documentclass[tikz,border=3.14mm]standalone

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic=
          draw[line width=2mm,pic actions] (0, 0) -

          path (0,0) pic[fill=green] myc (1,3) pic[fill=blue] myc (2,6) pic[fill=blue] myc;
          endtikzpicture

          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 20 at 12:47









          marmotmarmot

          132k6166317




          132k6166317







          • 2





            @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

            – marmot
            May 20 at 12:54












          • 2





            @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

            – marmot
            May 20 at 12:54







          2




          2





          @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

          – marmot
          May 20 at 12:54





          @caffeinemachine I personally prefer pic actions over an argument in the pic in this case because you can then add dashed and/or draw=red and so on which you cannot do in the same simple way if you use arguments of the pics.

          – marmot
          May 20 at 12:54











          4














          Your pic can have arguments.



          documentclass[border=5mm]standalone
          usepackagepgfplots
          pgfplotssetcompat=1.10,
          ticks=none
          usepgfplotslibraryfillbetween
          usetikzlibrarybackgrounds,
          calc,
          patterns

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic= cycle;


          path (0,0) pic myc=red (1,3) pic myc=green (2,6) pic myc=blue;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer

























          • Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

            – caffeinemachine
            May 20 at 12:51






          • 2





            @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

            – The old JouleV
            May 20 at 12:54
















          4














          Your pic can have arguments.



          documentclass[border=5mm]standalone
          usepackagepgfplots
          pgfplotssetcompat=1.10,
          ticks=none
          usepgfplotslibraryfillbetween
          usetikzlibrarybackgrounds,
          calc,
          patterns

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic= cycle;


          path (0,0) pic myc=red (1,3) pic myc=green (2,6) pic myc=blue;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer

























          • Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

            – caffeinemachine
            May 20 at 12:51






          • 2





            @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

            – The old JouleV
            May 20 at 12:54














          4












          4








          4







          Your pic can have arguments.



          documentclass[border=5mm]standalone
          usepackagepgfplots
          pgfplotssetcompat=1.10,
          ticks=none
          usepgfplotslibraryfillbetween
          usetikzlibrarybackgrounds,
          calc,
          patterns

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic= cycle;


          path (0,0) pic myc=red (1,3) pic myc=green (2,6) pic myc=blue;
          endtikzpicture

          enddocument


          enter image description here






          share|improve this answer















          Your pic can have arguments.



          documentclass[border=5mm]standalone
          usepackagepgfplots
          pgfplotssetcompat=1.10,
          ticks=none
          usepgfplotslibraryfillbetween
          usetikzlibrarybackgrounds,
          calc,
          patterns

          begindocument

          begintikzpicture[scale=4, transform shape]
          tikzset
          myc/.pic= cycle;


          path (0,0) pic myc=red (1,3) pic myc=green (2,6) pic myc=blue;
          endtikzpicture

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 20 at 12:50

























          answered May 20 at 12:49









          The old JouleVThe old JouleV

          19.5k43175




          19.5k43175












          • Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

            – caffeinemachine
            May 20 at 12:51






          • 2





            @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

            – The old JouleV
            May 20 at 12:54


















          • Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

            – caffeinemachine
            May 20 at 12:51






          • 2





            @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

            – The old JouleV
            May 20 at 12:54

















          Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

          – caffeinemachine
          May 20 at 12:51





          Yeah I looked at the manual. But it's big. Can you tell me under what heading should I look? Thanks.

          – caffeinemachine
          May 20 at 12:51




          2




          2





          @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

          – The old JouleV
          May 20 at 12:54






          @caffeinemachine Alright, it is in section 18, especially 18.3. It tells you how to define new pics. Reading about the key handler and the example on page 264, you will know that pic is, literally, a kind of style. So you read about .style key handler in section 87.4.4, page 966, and boom, you know how to add one, or two, or even nine arguments to a pic.

          – The old JouleV
          May 20 at 12:54


















          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%2f491746%2fset-outline-first-and-fill-colors-later%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

          How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

          What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

          Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?