matplotlib - how to align axis label to the right -


by default matplotlib plots axis label @ center of axis. move label in such way aligned end of axis, both horizontal , vertical axis. example horizontal axis see:

+--------------------+ |                    | |                    | |                    | |                    | |                    | +--------------------+                  label 

is possibile global setting of matplotlib?

ok, i'll leave alone other answer(1), one

... plt.xlabel('x_description', horizontalalignment='right', x=1.0) plt.ylabel('y_description', horizontalalignment='right', y=1.0) ... 

as can see, no more magic numbers, , works both xlabel , ylabel.

note in both cases going change horizontal alignment, reasons clear me when first changed vertical alignment in ylabel...


(1) because idea of getting object, modifying object , setting idea on own, isn't it?


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -