It might or might not be wise, but I don't think it is essential that every possible property be controllable from this interface, but it makes sense to provide control over those for reasonably common use cases, possibly with additional aggregations to suit real-life uses. For example, using the 'colors' kwarg one can change the color of the ticks and their labels, for x and/or y, major and/or minor. I added the latter quite some time ago as a one-stop-shop for common customizations, accessible from the Axes level. You make good points here but I think that neither the setp interface nor the Axes.tick_params interface is ideal. Why is the visible property of the text not the one we want to use? Providing setp as axes method is really all that is needed here.Ĭoncerning the visibility, it's not really clear why some new mechanism is needed. So for consistency it could take all Text arguments, prepended by label, but that would lead to labelhorizontalalignment and such.įurther, the code inside set_tick_params is really heavy with a lot of if and dictionary shuffling.Īll this stands opposed to a very clear artist based getter/setter structure, where the only drawback is that you need a loop or a pyplot function ( setp) to access it. This is because it essentially provides access to 3 different things: the tickmarkers, the grid and the labels. The problem is that this interface is already completely cluttered with arguments (which sometimes are not named consistently). On the one hand it is for sure useful to add horizontalalignment, verticalalignment and rotation_mode.īut then why not add alpha, fontweight, zorder, style, backgroundcolor etc.? Here's the full list that ax.tickparams claims to be able to handle, based on a traceback: It looks like adding them would be a good how did you find the alignments etc. It handles 'labelsize', 'labelrotation', and 'labelcolor' but I don't see the alignments or rotation_mode. I don't think that reverting this is warranted ax.tick_params is a nicer interface, and it provides an adequate replacement for the set_visible manipulation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |