Non scalable unit in tikz












9














Is there a non scalable unit in tikz?



I have the following picture,



    documentclass{report}
usepackage{tikz}
begin{document}
begin{tikzpicture}[>=latex, scale=2]
draw[->] (0,0) -- (2,1);
filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
(2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
end{tikzpicture}
end{document}


Some elements, like the line width, the arrowheads or the text aren't affected by the scale=2 option. I would like the circles to behave in the same fashion. Is this possible? I tried using different units for the circle radius (cm, pt, em) but I had no luck.










share|improve this question





























    9














    Is there a non scalable unit in tikz?



    I have the following picture,



        documentclass{report}
    usepackage{tikz}
    begin{document}
    begin{tikzpicture}[>=latex, scale=2]
    draw[->] (0,0) -- (2,1);
    filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
    (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
    end{tikzpicture}
    end{document}


    Some elements, like the line width, the arrowheads or the text aren't affected by the scale=2 option. I would like the circles to behave in the same fashion. Is this possible? I tried using different units for the circle radius (cm, pt, em) but I had no luck.










    share|improve this question



























      9












      9








      9


      1





      Is there a non scalable unit in tikz?



      I have the following picture,



          documentclass{report}
      usepackage{tikz}
      begin{document}
      begin{tikzpicture}[>=latex, scale=2]
      draw[->] (0,0) -- (2,1);
      filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
      (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
      end{tikzpicture}
      end{document}


      Some elements, like the line width, the arrowheads or the text aren't affected by the scale=2 option. I would like the circles to behave in the same fashion. Is this possible? I tried using different units for the circle radius (cm, pt, em) but I had no luck.










      share|improve this question















      Is there a non scalable unit in tikz?



      I have the following picture,



          documentclass{report}
      usepackage{tikz}
      begin{document}
      begin{tikzpicture}[>=latex, scale=2]
      draw[->] (0,0) -- (2,1);
      filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
      (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
      end{tikzpicture}
      end{document}


      Some elements, like the line width, the arrowheads or the text aren't affected by the scale=2 option. I would like the circles to behave in the same fashion. Is this possible? I tried using different units for the circle radius (cm, pt, em) but I had no luck.







      tikz-pgf scale






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 11 '18 at 13:38









      jfbu

      46.1k66148




      46.1k66148










      asked Dec 11 '18 at 12:38









      mendus

      1065




      1065






















          2 Answers
          2






          active

          oldest

          votes


















          10














          You could use a node instead of a circle. nodes don't scale either:



           documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) node[circle,inner sep=0.025cm,fill=black]{} node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer





















          • Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
            – mendus
            Dec 12 '18 at 9:25










          • 0.025cm is half of 0.05cm, your wanted radius.
            – Ulrike Fischer
            Dec 12 '18 at 9:30










          • Oh, ok. I didn't realize the node was otherwise empty.
            – mendus
            Dec 12 '18 at 9:33



















          8














          Yes, scale really scales mainly distances, not line widths etc. UPDATE: I misread the question, sorry, and big thanks to Paul Paulsen for pointing this out. You can just divide out the scale factor in the circle radii.



          documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm/myscale] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm/myscale] node[anchor=north] {$Q$};
          end{tikzpicture}
          begin{tikzpicture}[>=latex]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here



          ORIGINAL ANSWER: Here I address how one can scale the line width with the distances. Note that I do not recommend using pgflowlevelsynccm here as it screws up the bounding box (which is why there are vspaces added), but I list it for completeness.



          documentclass{report}
          usepackage[margin=1in]{geometry}
          usepackage{tikz}
          begin{document}
          subsection*{Original post}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}

          subsection*{Using texttt{textbackslash pgflowlevelsynccm}}

          vspace*{2cm}
          begin{tikzpicture}[>=latex, scale=2]
          pgflowlevelsynccm
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          vspace*{1cm}

          subsection*{Reading out transformation and applying it to lines etc.}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}


          subsection*{Reading out transformation and applying it to lines etc. (2)}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          subsection*{Reading out transformation and applying it to lines etc. (3)}
          begin{tikzpicture}[>=latex, scale=2,transform shape]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          end{document}


          enter image description here



          And I would draw the thing probably like this:



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2,bullet/.style={transform shape,inner
          sep=0.05cm,fill,circle}]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,shorten >=2pt,line width=myscale*pgflinewidth]
          (0,0) node[bullet,label=below:$P$]{}
          -- (2,1) node[bullet,label=below:$Q$]{};
          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer























          • But the OP asks how to not scale the circles, not how to scale everything...
            – Paul Paulsen
            Dec 11 '18 at 21:37










          • @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
            – marmot
            Dec 11 '18 at 21:57






          • 1




            +1, nice update and a cool way to deal with the problem :)
            – Paul Paulsen
            Dec 11 '18 at 21:59










          • While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
            – mendus
            Dec 12 '18 at 9:30











          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%2f464315%2fnon-scalable-unit-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









          10














          You could use a node instead of a circle. nodes don't scale either:



           documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) node[circle,inner sep=0.025cm,fill=black]{} node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer





















          • Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
            – mendus
            Dec 12 '18 at 9:25










          • 0.025cm is half of 0.05cm, your wanted radius.
            – Ulrike Fischer
            Dec 12 '18 at 9:30










          • Oh, ok. I didn't realize the node was otherwise empty.
            – mendus
            Dec 12 '18 at 9:33
















          10














          You could use a node instead of a circle. nodes don't scale either:



           documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) node[circle,inner sep=0.025cm,fill=black]{} node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer





















          • Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
            – mendus
            Dec 12 '18 at 9:25










          • 0.025cm is half of 0.05cm, your wanted radius.
            – Ulrike Fischer
            Dec 12 '18 at 9:30










          • Oh, ok. I didn't realize the node was otherwise empty.
            – mendus
            Dec 12 '18 at 9:33














          10












          10








          10






          You could use a node instead of a circle. nodes don't scale either:



           documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) node[circle,inner sep=0.025cm,fill=black]{} node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer












          You could use a node instead of a circle. nodes don't scale either:



           documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) node[circle,inner sep=0.025cm,fill=black]{} node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 11 '18 at 13:31









          Ulrike Fischer

          187k7290670




          187k7290670












          • Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
            – mendus
            Dec 12 '18 at 9:25










          • 0.025cm is half of 0.05cm, your wanted radius.
            – Ulrike Fischer
            Dec 12 '18 at 9:30










          • Oh, ok. I didn't realize the node was otherwise empty.
            – mendus
            Dec 12 '18 at 9:33


















          • Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
            – mendus
            Dec 12 '18 at 9:25










          • 0.025cm is half of 0.05cm, your wanted radius.
            – Ulrike Fischer
            Dec 12 '18 at 9:30










          • Oh, ok. I didn't realize the node was otherwise empty.
            – mendus
            Dec 12 '18 at 9:33
















          Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
          – mendus
          Dec 12 '18 at 9:25




          Is there any reason why you chose inner sep=0.025 and not 0 or any other number?
          – mendus
          Dec 12 '18 at 9:25












          0.025cm is half of 0.05cm, your wanted radius.
          – Ulrike Fischer
          Dec 12 '18 at 9:30




          0.025cm is half of 0.05cm, your wanted radius.
          – Ulrike Fischer
          Dec 12 '18 at 9:30












          Oh, ok. I didn't realize the node was otherwise empty.
          – mendus
          Dec 12 '18 at 9:33




          Oh, ok. I didn't realize the node was otherwise empty.
          – mendus
          Dec 12 '18 at 9:33











          8














          Yes, scale really scales mainly distances, not line widths etc. UPDATE: I misread the question, sorry, and big thanks to Paul Paulsen for pointing this out. You can just divide out the scale factor in the circle radii.



          documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm/myscale] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm/myscale] node[anchor=north] {$Q$};
          end{tikzpicture}
          begin{tikzpicture}[>=latex]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here



          ORIGINAL ANSWER: Here I address how one can scale the line width with the distances. Note that I do not recommend using pgflowlevelsynccm here as it screws up the bounding box (which is why there are vspaces added), but I list it for completeness.



          documentclass{report}
          usepackage[margin=1in]{geometry}
          usepackage{tikz}
          begin{document}
          subsection*{Original post}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}

          subsection*{Using texttt{textbackslash pgflowlevelsynccm}}

          vspace*{2cm}
          begin{tikzpicture}[>=latex, scale=2]
          pgflowlevelsynccm
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          vspace*{1cm}

          subsection*{Reading out transformation and applying it to lines etc.}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}


          subsection*{Reading out transformation and applying it to lines etc. (2)}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          subsection*{Reading out transformation and applying it to lines etc. (3)}
          begin{tikzpicture}[>=latex, scale=2,transform shape]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          end{document}


          enter image description here



          And I would draw the thing probably like this:



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2,bullet/.style={transform shape,inner
          sep=0.05cm,fill,circle}]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,shorten >=2pt,line width=myscale*pgflinewidth]
          (0,0) node[bullet,label=below:$P$]{}
          -- (2,1) node[bullet,label=below:$Q$]{};
          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer























          • But the OP asks how to not scale the circles, not how to scale everything...
            – Paul Paulsen
            Dec 11 '18 at 21:37










          • @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
            – marmot
            Dec 11 '18 at 21:57






          • 1




            +1, nice update and a cool way to deal with the problem :)
            – Paul Paulsen
            Dec 11 '18 at 21:59










          • While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
            – mendus
            Dec 12 '18 at 9:30
















          8














          Yes, scale really scales mainly distances, not line widths etc. UPDATE: I misread the question, sorry, and big thanks to Paul Paulsen for pointing this out. You can just divide out the scale factor in the circle radii.



          documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm/myscale] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm/myscale] node[anchor=north] {$Q$};
          end{tikzpicture}
          begin{tikzpicture}[>=latex]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here



          ORIGINAL ANSWER: Here I address how one can scale the line width with the distances. Note that I do not recommend using pgflowlevelsynccm here as it screws up the bounding box (which is why there are vspaces added), but I list it for completeness.



          documentclass{report}
          usepackage[margin=1in]{geometry}
          usepackage{tikz}
          begin{document}
          subsection*{Original post}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}

          subsection*{Using texttt{textbackslash pgflowlevelsynccm}}

          vspace*{2cm}
          begin{tikzpicture}[>=latex, scale=2]
          pgflowlevelsynccm
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          vspace*{1cm}

          subsection*{Reading out transformation and applying it to lines etc.}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}


          subsection*{Reading out transformation and applying it to lines etc. (2)}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          subsection*{Reading out transformation and applying it to lines etc. (3)}
          begin{tikzpicture}[>=latex, scale=2,transform shape]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          end{document}


          enter image description here



          And I would draw the thing probably like this:



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2,bullet/.style={transform shape,inner
          sep=0.05cm,fill,circle}]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,shorten >=2pt,line width=myscale*pgflinewidth]
          (0,0) node[bullet,label=below:$P$]{}
          -- (2,1) node[bullet,label=below:$Q$]{};
          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer























          • But the OP asks how to not scale the circles, not how to scale everything...
            – Paul Paulsen
            Dec 11 '18 at 21:37










          • @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
            – marmot
            Dec 11 '18 at 21:57






          • 1




            +1, nice update and a cool way to deal with the problem :)
            – Paul Paulsen
            Dec 11 '18 at 21:59










          • While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
            – mendus
            Dec 12 '18 at 9:30














          8












          8








          8






          Yes, scale really scales mainly distances, not line widths etc. UPDATE: I misread the question, sorry, and big thanks to Paul Paulsen for pointing this out. You can just divide out the scale factor in the circle radii.



          documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm/myscale] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm/myscale] node[anchor=north] {$Q$};
          end{tikzpicture}
          begin{tikzpicture}[>=latex]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here



          ORIGINAL ANSWER: Here I address how one can scale the line width with the distances. Note that I do not recommend using pgflowlevelsynccm here as it screws up the bounding box (which is why there are vspaces added), but I list it for completeness.



          documentclass{report}
          usepackage[margin=1in]{geometry}
          usepackage{tikz}
          begin{document}
          subsection*{Original post}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}

          subsection*{Using texttt{textbackslash pgflowlevelsynccm}}

          vspace*{2cm}
          begin{tikzpicture}[>=latex, scale=2]
          pgflowlevelsynccm
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          vspace*{1cm}

          subsection*{Reading out transformation and applying it to lines etc.}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}


          subsection*{Reading out transformation and applying it to lines etc. (2)}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          subsection*{Reading out transformation and applying it to lines etc. (3)}
          begin{tikzpicture}[>=latex, scale=2,transform shape]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          end{document}


          enter image description here



          And I would draw the thing probably like this:



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2,bullet/.style={transform shape,inner
          sep=0.05cm,fill,circle}]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,shorten >=2pt,line width=myscale*pgflinewidth]
          (0,0) node[bullet,label=below:$P$]{}
          -- (2,1) node[bullet,label=below:$Q$]{};
          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer














          Yes, scale really scales mainly distances, not line widths etc. UPDATE: I misread the question, sorry, and big thanks to Paul Paulsen for pointing this out. You can just divide out the scale factor in the circle radii.



          documentclass{report}
          usepackage{tikz}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm/myscale] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm/myscale] node[anchor=north] {$Q$};
          end{tikzpicture}
          begin{tikzpicture}[>=latex]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          end{document}


          enter image description here



          ORIGINAL ANSWER: Here I address how one can scale the line width with the distances. Note that I do not recommend using pgflowlevelsynccm here as it screws up the bounding box (which is why there are vspaces added), but I list it for completeness.



          documentclass{report}
          usepackage[margin=1in]{geometry}
          usepackage{tikz}
          begin{document}
          subsection*{Original post}
          begin{tikzpicture}[>=latex, scale=2]
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}

          subsection*{Using texttt{textbackslash pgflowlevelsynccm}}

          vspace*{2cm}
          begin{tikzpicture}[>=latex, scale=2]
          pgflowlevelsynccm
          draw[->] (0,0) -- (2,1);
          filldraw (0,0) circle[radius=0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}
          vspace*{1cm}

          subsection*{Reading out transformation and applying it to lines etc.}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[anchor=north] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[anchor=north] {$Q$};
          end{tikzpicture}


          subsection*{Reading out transformation and applying it to lines etc. (2)}
          begin{tikzpicture}[>=latex, scale=2]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          subsection*{Reading out transformation and applying it to lines etc. (3)}
          begin{tikzpicture}[>=latex, scale=2,transform shape]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,line width=myscale*pgflinewidth] (0,0) -- (2,1);
          filldraw[,line width=myscale*pgflinewidth]
          (0,0) circle[radius=myscale*0.05cm] node[below=myscale*0.05cm] {$P$}
          (2,1) circle[radius=myscale*0.05cm] node[above=myscale*0.05cm] {$Q$};
          end{tikzpicture}

          end{document}


          enter image description here



          And I would draw the thing probably like this:



          documentclass[tikz,border=3.14mm]{standalone}
          begin{document}
          begin{tikzpicture}[>=latex, scale=2,bullet/.style={transform shape,inner
          sep=0.05cm,fill,circle}]
          pgfgettransformentries{myscale}{tmp}{tmp}{tmp}{tmp}{tmp}
          draw[->,shorten >=2pt,line width=myscale*pgflinewidth]
          (0,0) node[bullet,label=below:$P$]{}
          -- (2,1) node[bullet,label=below:$Q$]{};
          end{tikzpicture}

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 11 '18 at 21:56

























          answered Dec 11 '18 at 13:12









          marmot

          88.3k4102190




          88.3k4102190












          • But the OP asks how to not scale the circles, not how to scale everything...
            – Paul Paulsen
            Dec 11 '18 at 21:37










          • @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
            – marmot
            Dec 11 '18 at 21:57






          • 1




            +1, nice update and a cool way to deal with the problem :)
            – Paul Paulsen
            Dec 11 '18 at 21:59










          • While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
            – mendus
            Dec 12 '18 at 9:30


















          • But the OP asks how to not scale the circles, not how to scale everything...
            – Paul Paulsen
            Dec 11 '18 at 21:37










          • @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
            – marmot
            Dec 11 '18 at 21:57






          • 1




            +1, nice update and a cool way to deal with the problem :)
            – Paul Paulsen
            Dec 11 '18 at 21:59










          • While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
            – mendus
            Dec 12 '18 at 9:30
















          But the OP asks how to not scale the circles, not how to scale everything...
          – Paul Paulsen
          Dec 11 '18 at 21:37




          But the OP asks how to not scale the circles, not how to scale everything...
          – Paul Paulsen
          Dec 11 '18 at 21:37












          @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
          – marmot
          Dec 11 '18 at 21:57




          @PaulPaulsen Very good point! Thanks a lot! (I had the opposite problem, i.e. wanted to scale the line width, some time ago, and was thinking this was asked here. But no, you are absolutely right, and I was too sloppy.)
          – marmot
          Dec 11 '18 at 21:57




          1




          1




          +1, nice update and a cool way to deal with the problem :)
          – Paul Paulsen
          Dec 11 '18 at 21:59




          +1, nice update and a cool way to deal with the problem :)
          – Paul Paulsen
          Dec 11 '18 at 21:59












          While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
          – mendus
          Dec 12 '18 at 9:30




          While having to write /myscale can be a hindrance if there are many nodes, it allows not to scale any shape, so it is useful.
          – mendus
          Dec 12 '18 at 9:30


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f464315%2fnon-scalable-unit-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

          Plaza Victoria

          Puebla de Zaragoza

          Musa