-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
No support for horizontal alignment in tick_params? #13774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There is a bit of discussion in #10911 (comment) and following comments. As to why it isn't implemented, the answer is simply noone has done it yet. The tick params used to be a big mess; by now it has become much cleaner code-wise. So maybe now is the time to actually add the missing properties. |
Note: The horizontal alignment of |
I'm not in favour of overloading the notion |
I‘m not suggesting if or how to handle this. But |
I don't think we need to question the usefulness. But let me reiterate. As an example, consider using long ticklabels as in A simple categorical heatmap. You want them to be right-aligned and rotated which is achieved using setters via
One could hence argue that setters are the way to set the properties of ticklabels in matplotlib. But, since the introduction of So more generally, one could summarize this into the question: What is the recommended interface to set axis label properties in matplotlib? |
Disclaimer: Did not take the time to read #10911 completely, but still want to give short feedback. Please let me know in case I'm completely out of context. From my naive point of view, your use case looks valid; and I would expect to be able to use |
Following the principle of least astonishment I'd say that if specifiying or Worth noting: The "justify" case can currently be accomplished via |
@ImportanceOfBeingErnest you are right with your example. Should we maybe allow the alignment parameters only for single |
+1 |
+1 |
xref #20644 |
With 3.9.2, I haven't be able to control anchor position for xticklabels especially in a secondary_xaxis.
Am I missing something ? |
@PBrockmann there is no out-of-the-box solution yet because the meaning of alignment is somewhat subtle. See the discussions above for details. Therefore, alignment is currently not available in |
Ok thanks ! It works. I was expecting a control on a specific axe rather than with plt. |
Why does
ax.tick_params
not support horizontal alignment?Also, there is no documentation for most of these supported keywords:
valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_contains', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms', 'grid_aa', 'grid_c', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']
Originally posted by @tdpetrou in #8122 (comment)
The text was updated successfully, but these errors were encountered: