2

I'm trying to create a circle, divided into four quadrants by a dashed "cross", where the top slice is slightly smaller than the bottom slice. I want to label the four quadrants with labels a, b, c, and d (centered inside the quadrants), as well as label the top and bottom slices.

Here is my first attempt:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\draw (0,0) circle (2cm);
\draw[dashed] (-2,1) -- (2,1);
\draw[dashed] (0,2) -- (0,-2);
\draw (0,1.5) node{Top Piece};
\draw (0,-0.5) node{Bottom Piece};
\draw (-1,1.5) node{$a$};
\draw (1,1.5) node{$b$};
\draw (-1,-0.5) node{$c$};
\draw (1,-0.5) node{$d$};
\end{tikzpicture}
\end{figure}
\end{document}

However it has at least a few problems:

  1. It is coordinate-based, which means it doesn't scale. If I want to make my circle bigger (and I am thinking bigger would be a good idea), I would have to redraw all the lines and nodes and labels to fit the new circle;
  2. The lines and circle don't intersect exactly, only approximately, which may be a consequence of #1;
  3. The vertical dashed line cuts through the labels "top piece" and "bottom piece".

Should I go about creating this circle a different way? Please pardon my beginner's knowledge of Tikz. And thanks for your help!

4

Text can not be scaled, consequently it can happens that at scaling which shrink the picture texts will overlapping. A possible solution is that texts a, top pieces and b merge in one node. Nodes with fill will hide dashed lines:

\documentclass{article}
    \usepackage{tikz}

\usepackage[active,floats,tightpage]{preview}%for showing just a picture
    \setlength\PreviewBorder{1em}

    \begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[scale=1,
every node/.style = {inner xsep=0mm, inner ysep=1mm, fill=white}
                    ]
\draw (0,0) circle (2cm);
\draw[densely dashed]   
    (150:2) -- (30:2)       (270:2) -- (90:2);
\draw (0,1.4) node[fill=white]{a Top Piece b};
\draw (0,-0.5) node[fill=white]{c\quad Bottom Piece\quad d};
\end{tikzpicture}
\end{figure}
    \end{document}

enter image description here

With scale=2 you obtain scaled pictures, but size of nodes stay the same.

enter image description here

  • Could you use the relsize package to scale the text as well, using a macro for the scale factors? – Erik Jun 19 '15 at 8:04
  • Of course :-), but what you like to achieve with it? Change the size of fonts? If you use it, the macro should be placed before tikzpicture, for example: \relsize{3}\begin{tikzpucture}[ .... <options> ...]. Matter of taste. – Zarko Jun 19 '15 at 9:22
  • 1
    @Zarko You can use scale=2,transform shape, to also scale the font size. – Gonzalo Medina Jun 19 '15 at 16:26
  • @Gonzalo Medina, thank you to pointed me to this possibilities. I was consider, that this is not what OP wish. When the scale is large, the text can become -- this is my opinion of course -- to large and picture becomes ugly. – Zarko Jun 19 '15 at 16:44
  • Thanks so much @Zarko ! Is it possible to center the a, b, c and d text in the center of the four quadrants? – Mathemanic Jun 19 '15 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.