You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but it does not seem to have any effect.
This was reported by NotBrianCox samwisehawkins@gmail.com in the user mailing list and here is his original message.
I'm plotting a series of sub plots within a figure, where most are small sub
plots, but the last one spans the width of the figure. For the final subplot
only, I want to set the xtick pad to 20. Something like:
But this doesn't have any effect on the final plot. I've also tried getting
the ticks individually and calling set_pad(20) i.e.:
for tick in ax3.xaxis.get_major_ticks():
tick.set_pad(20)
But this does't work either. Anyone have an ideas?
Apparently, set_pad only sets Tick._pad and I believe it does not have any effect unless the transform property is also updated. Also, _pad attribute is overwritten by apply_tickdir method.
I feel that the set_pad method should set "_base_pad" attribute and update the transform. Or change the documentation to state these explicitly.
Just in case, pads can be changed using the tick_params method.
ax3.tick_params(pad=20)
This sets _base_pad property and update the transform.
See pull request #144. I changed _pad to _base_pad in a couple other places as well as having set_pad use the existing machinery for updating the pad. Review of whether those changes make sense, or whether I missed something, is welcome.
Activity
axis.py: make Tick.set_pad effective as advertised; closes Issue matp…
efiring commentedon Jun 16, 2011
See pull request #144. I changed _pad to _base_pad in a couple other places as well as having set_pad use the existing machinery for updating the pad. Review of whether those changes make sense, or whether I missed something, is welcome.
leejjoon commentedon Jun 16, 2011
#144 fixes the problem. I quickly went through the patch and the source code of axis.py and everything seems to be addressed. Thanks.
Merge pull request matplotlib#88 from francisco-dlp/FIX-align2D
Merge pull request matplotlib#88 from fgoudreault/report_doc