seaborn.objects: Rotation of ticks #3169
Replies: 7 comments
-
I assume you mean rotation of tick labels? I don't think that's currently supported since it's not (AFAICT) something you can set a default for with |
Beta Was this translation helpful? Give feedback.
-
I presume the implementation is difficult then. That's pity, data scientists from my bubble need it quite often. If there was a switch for example |
Beta Was this translation helpful? Give feedback.
-
@JanPalasek quite naturally, I tried something very similar, it could also be part of the tick method |
Beta Was this translation helpful? Give feedback.
-
That's a reasonable place expect the parameter, but implementation-wise, it doesn't make sense. |
Beta Was this translation helpful? Give feedback.
-
@mwaskom Could this interface be expanded? def label(self, rotation=None, formatter_param1=None, formatter_param2=None, formatter=None):
pass Or even decide on each individual parameter, whether it is a parameter for formatter or for some other component (artist?). |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
See the answer by Brian Head in this StackOverflow response. It has worked well in plots with faceting and or no-facets. p = (
so.Plot(data=df, x="...", y="...")
.facet(col="...")
.add(so.Bars())
.theme({"figure.figsize": (16, 6)})
).plot() # Notice the call to plot
# If the facet includes two columns
p._figure.axes[0].xaxis.set_tick_params(rotation=90)
p._figure.axes[1].xaxis.set_tick_params(rotation=90)
p.show() |
Beta Was this translation helpful? Give feedback.
-
Hello,
might I suggest a new feature request: rotation of the ticks for seaborn objects? Or is it possible at this moment? I haven't found it yet.
Currently I use
.on(axis).plot()
and then on this axis I set it up via matplotlib withaxis.xaxis.set_tick_params(rotation=90)
.Beta Was this translation helpful? Give feedback.
All reactions