I'm afraid there is no simple answer to your question. In TikZ
you usually do not want to scale nodes and the text within. (Till Tantau, the author of the package just calls it 'evil'. :) )
By specifying a scaling factor (e.g. \begin{tikzpicture}[scale=<scaling factor>]
), every item drawn in the current tikzpicture
environment should be scaled to its appropriate size. (This is possible because TikZ
produces vector graphics - 'scaleable' graphics, if you like - unlike bitmap graphics that become 'pixelated' when magnified.)
Nodes are a different breed of objects. For one thing they take the font size from the 'surroundings' and they are immune to 'external' transformations. And this is best left like that, I think. There is, however, an option to force nodes to scale according to the scaling factor of the environment: transform shape
. (It also forces rotations, etc.) It is also possible to place a node explicitly on a line, with the pos
option.
About the absolute dimensions now: you can specify document-specific dimensions too, if that is your need: e.g. \paperheight
and \paperwidth
work well. Use their fractions and the figures will be adjusted to new page sizes automatically. (They are also used to create the cover page of the TikZ 2.10 manual
.)
I'm not sure above=1cm of othernode
is a good idea. I'd rather set the node distance
parameter (create a new scope
, if it does not apply to the whole picture) and use above=of othernode
, letting TikZ
use the spacing specified earlier. (Of course, if there is only one such node in the whole picture, it can be more comfortable to set the distance only once, by hand.)
I hope I've been of any help.
The anti-aliasing operation is global and made by PDF renderer.
Here, your example:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill (0,0) circle (0.1);
\fill[color=yellow] (0,0) circle (0.1);
\fill[color=yellow] (0.21,0) circle (0.1);
\end{tikzpicture}
\end{document}
The bitmap result produced by this command:
pdftoppm -r 900 example.pdf | pnmtopng > example.png
The bitmap result produced by the following command (the aaVector
option allows to enable or disable vector anti-aliasing):
pdftoppm -r 900 -aaVector no example.pdf | pnmtopng > example.png
With Adobe Reader, you can enable or disable anti-aliasing:
Preferences>>Page Display>>Smooth line art
Evince does not offer an option to disable the anti-aliasing.
Best Answer
You should do your diagram as at the scale you think you want, and then if you want to scale the figur, say to half its size, apply
[scale=0.5]
option:The blue is the original with a default
scale=1.0
, and the red is scaled by 50%. Note that the coordinate of the center of the circle, and the location of the nodes is also scaled, and the size of the text is not scaled, which is usually the desired behavior.If you want to scale the text as well you should have a look at How to scale Tikz drawings and text together?