-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Add sublabel_index
and sublabel_skip
option for matplotlib backend
#6375
Conversation
Do you have a MRE I can play around with? I'm not entirely sure if this is the best way to expose this customization. |
import holoviews
holoviews.extension("matplotlib")
# For simplicity, let's just copy the plots
curve = holoviews.Curve([0, 1, 2])
layout = holoviews.Layout()
layout += curve
layout += curve
layout += curve
layout += curve
layout.cols(2)
layout.opts(
sublabel_format=r"{alpha})",
sublabel_index_offset=-1,
) |
I'm afraid |
I pushed some changes, changing from import holoviews as hv
hv.extension("matplotlib")
c = lambda: hv.Curve([0, 1, 2])
layout = (c() + c() + c() + c()).cols(2)
layout.opts(sublabel_skip=[1, 3]) I will look into the other part of your requests later. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6375 +/- ##
========================================
Coverage 88.49% 88.50%
========================================
Files 323 323
Lines 68184 68311 +127
========================================
+ Hits 60341 60458 +117
- Misses 7843 7853 +10 ☔ View full report in Codecov by Sentry. |
This interface works for my needs 👍 |
sublabel_index_offset
option for matplotlib backendsublabel_index
and sublabel_skip
option for matplotlib backend
This allows to alter the index count of the sublabels, e.g. I have the following plot:
But the top element (
a)
) is not an actual subplot, just a colorbar for all the other. But exposing this option allows to basically ignore the first subplot. When numbering. In another situation I have an opposite problem, where I created a group of plots, but then I attach manually another subplot within LaTeX, then I want the numbering to skip a few labels.