Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #33 from nschloe/more-fix
Browse files Browse the repository at this point in the history
another fix
  • Loading branch information
nschloe committed Jun 7, 2021
2 parents 09f25ff + d436e7c commit c9cc05f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dufte
version = 0.2.18
version = 0.2.19
author = Nico Schlömer
author_email = nico.schloemer@gmail.com
description = Clean matplotlib plots
Expand Down
5 changes: 3 additions & 2 deletions src/dufte/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,11 @@ def ylabel(string):
bbox = ax.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
width_in = bbox.width
pad_axcoords = pad_in / width_in
pos = (-pad_axcoords, ticks[-1] + 0.1)
else:
pad_axcoords = 0.0
pos = (0.0, 1.0)

ylabel = plt.ylabel(string, horizontalalignment="right", multialignment="right")
# place the label 10% above the top tick
plt.gca().yaxis.set_label_coords(-pad_axcoords, ticks[-1] + 0.1)
plt.gca().yaxis.set_label_coords(*pos)
ylabel.set_rotation(0)

0 comments on commit c9cc05f

Please sign in to comment.