5

The tkz-euclide package lets you do things like

\begin{tikzpicture}
  \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} \tkzDefPoint(2,3){C}
  \tkzDrawPoints(A,B,C)
  \tkzDrawSegments(A,B B,C C,A)
\end{tikzpicture}

However, by default, the point style is filled with a semi-transparent black.* Using \tkzDrawPoints[fill=black] fixes this, but it would be nice to be able to style all the points to, by default, use a black fill.

What styles, TikZ or tkz-euclide, should I use to accomplish this?


* Note for posterity: It's not actually a semi-transparent black. Rather, it's a solid gray. Moving the \tkzDrawPoints command after the \tkzDrawSegments command makes this clear.


MWE:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
  \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} \tkzDefPoint(2,3){C}
  \tkzDrawPoints(A,B,C)  % want them filled
  \tkzDrawSegments(A,B B,C C,A)
\end{tikzpicture}
\end{document}

1 Answer 1

9

You can use

\tkzSetUpPoint[<options>]

to customize the attributes for points. An example:

\documentclass{article}
\usepackage{tikz}
\usepackage{tkz-euclide}
\tkzSetUpPoint[fill=black]

\begin{document}
\begin{tikzpicture}
  \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} \tkzDefPoint(2,3){C}
  \tkzDrawPoints(A,B,C)  % want them filled
  \tkzDrawSegments(A,B B,C C,A)
\end{tikzpicture}
\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .