Dear all,
I have a quesstion about change the width of the ylabel.You know the width of the ylabel is relaete to the x axi,how can i change the width of the ylabel not depend on the width of the x-axis?
Thank you!
George
Dear all,
I have a quesstion about change the width of the ylabel.You know the width of the ylabel is relaete to the x axi,how can i change the width of the ylabel not depend on the width of the x-axis?
Thank you!
George
2010/12/31 余亮罡 <nuptyu@…572…>
Dear all,
I have a quesstion about change the width of the ylabel.You know the width of the ylabel is relaete to the x axi,how can i change the width of the ylabel not depend on the width of the x-axis?
Thank you!
George
Maybe I am not understanding. The height of the y-axis label text (which is then rotated 90 degrees) is dependent upon the font size, and should already be completely independent of the x-axis. Can you show some examples of what you mean?
Ben Root
Hi Ben:
I just do not know how to change the font size,could you tell me that? Thank you !
At 2011-01-01 07:08:23,“Benjamin Root” <ben.root@…553…> wrote:
2010/12/31 余亮罡 <nuptyu@…572…>
Dear all,
I have a quesstion about change the width of the ylabel.You know the width of the ylabel is relaete to the x axi,how can i change the width of the ylabel not depend on the width of the x-axis?
Thank you!
George
Maybe I am not understanding. The height of the y-axis label text (which is then rotated 90 degrees) is dependent upon the font size, and should already be completely independent of the x-axis. Can you show some examples of what you mean?
Ben Root
余亮罡, on 2011-01-03 13:31, wrote:
I just do not know how to change the font size,could you tell
me that? Thank you !
Here's a small example. You can either keep around the ylabel
from when you first create it:
import matplotlib.pyplot as plt
lbl = plt.ylabel("foo")
lbl.set_size(25)
If you already have the labels on an axes:
ax = plt.gca()
lbl = ax.yaxis.get_label()
lbl.set_size('x-small')
Note that ax.get_ylabel() only gets you the string of the
label, which is why you have to use ax.yaxis.get_label() to get
an instance of the matplotlib.text.Text object in order to change
its size.
hope that helps,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7