14

I'm trying to draw a small brace. For example the LaTeX code is like this:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
    \draw[decorate,decoration={brace,mirror}] (0,0) -- (0,0.1);
\end{tikzpicture}
\end{document}

but all I got is like this (after zoomed in):

enter image description here

How can I deal with it?

windy
  • 435

2 Answers2

8

I hope you are aware of the fact that your brace (the decorated path) is only one millimeter long. That’s tiny!

Nevertheless, you can decrease the amplitude to get a better result, i.e.

decoration={brace, mirror, amplitude=+.6pt}

Code

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\foreach \lw in {ultra thin, very thin, thin}{% linewidth: .1pt, .2pt, .4pt
\begin{tikzpicture}[\lw]
  \draw[decoration={brace,mirror}] \foreach \amp in {0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1} {
    [/pgf/decoration/amplitude=\amp pt] (\amp,0) decorate {-- ++(up:.1)}
      node [above,scale=.4] {\tiny\amp}};
  \draw[ultra thin] (-.1,0) -- + (left:.02) |- +(up:.1)
    node[scale=.4, left, pos=.25, inner sep=+1pt] {\tiny1\,mm};
\end{tikzpicture}}
\end{document}

Output

enter image description here enter image description here enter image description here

Qrrbrbirlbel
  • 119,821
7

The problem is that your brace is too small. You can draw it in a reasonable size and rescale it. See for example Correctly scaling a tikzpicture. The following code seems to work

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\tikzset{
  % see http://www.texample.net/tikz/examples/pgf-version-2/
  dot/.style={fill=black,circle,minimum size=1pt,inner sep=0},
}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
  \node[dot] at (-0.1,0) {};
  \begin{pgflowlevelscope}{\pgftransformscale{0.1}}
    \draw[decorate,decoration={brace,mirror}] (0,0) -- (0,1);
  \end{pgflowlevelscope}
  \node[dot] at (-0.1,.1) {};
\end{tikzpicture}
\end{document}

enter image description here

giordano
  • 8,486