Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions mathics/builtin/drawing/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,8 @@ class PieChart(_Chart):
<li>SectorSpacing" (default Automatic)
</ul>

A pie chart for a list of values:
>> PieChart[Range[4]]
A hypothetical comparsion between types of pets owned:
>> PieChart[{30, 20, 10}, ChartLabels -> {Dogs, Cats, Fish}]
= -Graphics-

A doughnut chart for a list of values:
Expand Down Expand Up @@ -2196,18 +2196,20 @@ def eval_f(self, f, x_value):


class PolarPlot(_Plot):
"""
u"""
<dl>
<dt>'PolarPlot[$r$, {$t$, $tmin$, $tmax$}]'
<dd>creates a polar plot of $r$ with angle $t$ ranging from
$tmin$ to $tmax$.
<dt>'PolarPlot[$r$, {$t$, $t_min$, $t_max$}]'
<dd>creates a polar plot of curve with radius $r$ as a function of angle $t$ ranging from $t_min$ to $t_max$.
</dl>

>> PolarPlot[Cos[5t], {t, 0, Pi}]
>> PolarPlot[Cos[5\\[Theta]], {\\[Theta], 0, Pi}]
= -Graphics-

>> PolarPlot[{1, 1 + Sin[20 t] / 5}, {t, 0, 2 Pi}]
= -Graphics-

>> PolarPlot[Sqrt[t], {t, 0, 16 Pi}]
= -Graphics-
"""

options = _Plot.options.copy()
Expand Down
1 change: 1 addition & 0 deletions mathics/doc/common_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def repl_list(match):
("\u00e9", r"\'e"),
("\u00ea", r"\^e"),
("\u03b3", r"$\gamma$"),
("\u03b8", r"$\theta$"),
("\u03bc", r"$\mu$"),
("\u03c0", r"$\pi$"),
("\u2107", r"$\mathrm{e}$"),
Expand Down
11 changes: 6 additions & 5 deletions mathics/docpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,16 @@ def test_case(test, tests, index=0, subindex=0, quiet=False, section=None):
def fail(why):
part, chapter, section = tests.part, tests.chapter, tests.section
print_and_log(
"%sTest failed: %s in %s / %s\n%s\n%s\n"
% (sep, section, part, chapter, test, why)
)
f"""{sep}Test failed: {section} in {part} / {chapter}
{part}
n{why}
""".encode("utf-8"))
return False

if not quiet:
if section:
print("%s %s / %s %s" % (stars, tests.chapter, section, stars))
print("%4d (%2d): TEST %s" % (index, subindex, test))
print(f"{stars} {tests.chapter} / {section} {stars}".encode("utf-8"))
print(f"{index:4d} ({subindex:2d}): TEST {test}".encode("utf-8"))

feeder = MathicsSingleLineFeeder(test, "<test>")
evaluation = Evaluation(definitions, catch_interrupt=False, output=TestOutput())
Expand Down