If I do
\draw (1,1) circle (1pt)
tikz draw a little circle with diameter 1pt
at (1,1)
.
How can I define a path cross
such that
\draw (1,1) cross (1pt)
draws a little cross with diameter 1pt
(adjustable in size just like the circle)?
tikz-pgf
If I do
\draw (1,1) circle (1pt)
tikz draw a little circle with diameter 1pt
at (1,1)
.
How can I define a path cross
such that
\draw (1,1) cross (1pt)
draws a little cross with diameter 1pt
(adjustable in size just like the circle)?
Best Answer
cross
command equivalent tocircle
doesn't exist inTiKZ
but you can use across out
node fromshapes.misc
library. This kind of node adds a cross over node's text, but it's easy to adapt it to do what you want.Because
circle (1pt)
draws a circle with radius=1pt, its total size will be 2pt, thencross
node's size is defined withminimum size=2*(#1-\pgflinewidth)
andinner
andouter
separations fixed to0pt
.If cross angle is not what you want, you can change it with
rotate
option. Next you have some examples. I've also placedcircles
over them just to show that circle and crosses have equal size.