Skip to content

Commit 37516be

Browse files
authored
Merge pull request #94 from MaxGhenis/ordinal_label
Move labels closer to the center from the edges in quantile_chg_chart
2 parents d54507d + 42965f9 commit 37516be

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/charts.ipynb

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

microdf/charts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def quantile_chg_plot(v1, v2, w1=None, w2=None, q=np.arange(0.1, 1, 0.1),
3131
plt.xticks([0, 1], [label1, label2])
3232
# Label the lines instead of using a legend.
3333
ax.get_legend().remove()
34-
ll.labelLines(plt.gca().get_lines())
34+
# Move line labels closer to the center.
35+
ll.labelLines(plt.gca().get_lines(), xvals=(0.1, 0.9))
3536
# Formatting.
3637
plt.title('Change in disposable income percentiles')
3738
plt.ylim(0, None)

0 commit comments

Comments
 (0)