Skip to content

Commit

Permalink
resolves pysal#145
Browse files Browse the repository at this point in the history
  • Loading branch information
jGaboardi committed Nov 8, 2022
1 parent 651032f commit f146623
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions mapclassify/_classify_API.py
Expand Up @@ -127,6 +127,17 @@ def classify(
Classify values by box_plot and set hinge to 2
>>> box_plot = classify(x, 'box_plot', hinge=2)
>>> box_plot
BoxPlot
<BLANKLINE>
Interval Count
----------------------
( -inf, -9.50] | 0
(-9.50, 25.70] | 13
(25.70, 33.50] | 12
(33.50, 43.30] | 12
(43.30, 78.50] | 9
(78.50, 96.40] | 3
"""
# reformat
Expand Down
2 changes: 1 addition & 1 deletion mapclassify/classifiers.py
Expand Up @@ -183,7 +183,7 @@ def _get_table(mc, fmt="{:.2f}"):
interval_width = max(interval_width, len("interval"))
header = "{:^{width}}".format("Interval", width=interval_width)
header += " " + "{:>{width}}".format("Count", width=count_width)
title = "{:<{width}}".format(mc.name, width=len(header))
title = mc.name
header += "\n" + "-" * len(header)
table = [title, "", header]
for i, interval in enumerate(intervals):
Expand Down

0 comments on commit f146623

Please sign in to comment.