Non scalable unit in tikz

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


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

Tags:

Scale

Tikz Pgf