Wikipedia:Reference desk/Archives/Mathematics/2007 January 12

= January 12 =

Pie chart question
how do you find a central angle in a pie chart
 * $$angle = 2\pi \frac{part}{total}$$, where angle is given in radians (change 2&pi; to 360 for degrees), part is the partial amount represented by the slice and total is the total amount represented by all slices. &mdash; Kieff 02:19, 12 January 2007 (UTC)
 * This has been nagging at me, so I'm going to point out that the markup here is wrong. When we write "part", TeX sees that as the product of p times a times r times t, and typesets it accordingly. Instead, use "\text{part}" or "\mathrm{part}" or "\mathit{part}", like so.
 * $$\begin{align}

\text{angle} &{}= 2\pi \frac{\text{part}}{\text{total}} && \qquad \text{(text, preferred)} \\ \mathrm{angle} &{}= 2\pi \frac{\mathrm{part}}{\mathrm{total}} && \qquad \text{(mathrm)} \\ \mathit{angle} &{}= 2\pi \frac{\mathit{part}}{\mathit{total}} && \qquad \text{(mathit)} \end{align}$$
 * In other contexts we need the name of an operator, such as "sin" or "fixedpoint". Common operators like the sine function are already defined, so we just prefix with a backslash: "\sin". Uncommon operators can be designated as such: "\operatorname{fixedpoint}".
 * $$\begin{align}

s_{binary} &{}= fixedpoint(sin \theta) && \qquad \text{(wrong)} \\ s_{\text{binary}} &{}= \operatorname{fixedpoint}(\sin \theta) && \qquad \text{(right)} \end{align}$$
 * Please take an extra moment to help keep our equations looking professional. Thanks! --KSmrqT 03:49, 16 January 2007 (UTC)
 * I used to do this, but using \mbox (that's probably incorrect too), but I kinda lost the habit... Anyway, thanks for pointing these out, I'll remember next time. :) &mdash; Kieff 05:23, 16 January 2007 (UTC)