Error when setting labels=False in plotting.add_at_risk_counts().
See original GitHub issueFor lifelines 0.25.0.
Getting an AttributeError: 'NoneType' object has no attribute 'replace'
because all labels are set to None if labels is False
:
if labels is None:
labels = [f._label for f in fitters]
elif labels is False:
labels = [None] * len(fitters)
labels = [l.replace("_", r"\_") for l in labels]
And is it possible to disable the rows ‘Censored’ and/or ‘Events’ in the ‘At risk’ counts? To have that configurable, or is it already configurable?!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Error plotting labels gnuplot - Stack Overflow
I would like to add the label (column 3). If i try plot '/root/temp.txt' using 2:xtic(1):3 with labels notitle it makes error...!
Read more >Visualizing Error — ggerrorplot • ggpubr - R Packages
logical value. Default is FALSE. Used only when y is a vector containing multiple variables to plot. If TRUE, create a multi-panel plot...
Read more >[ncl-talk] How to have a plot with different panel label bar
Looking at those error messages more closely: are you setting the gsnSpreadColors in your res2 resource list for your xy plot?
Read more >getdist.plots — GetDist 1.4 documentation
An exception that is raised when there is an error plotting. class getdist.plots. ... False: colored lines/boxes are drawn before black labels.
Read more >Manually create legend in Plots.jl - Julia Discourse
The legend might show a colored line paired with a label: (b… ... Try setting label=false in the previous plots. 1 Like. Christopher_Fisher...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
rows_to_show
kwarg inadd_at_risk_counts
that can configure what is shown.All in the latest v0.25.1
I think it’s the italic font somehow creates extra space on the first column. If i take out the italic font setting, or add it to the rest of ticks by changing this line: https://github.com/CamDavidsonPilon/lifelines/blob/cae49555be8c66a09c95ba28f52189941aa89821/lifelines/plotting.py#L491 into
lbl += "$\\mathit{}$" + s.format(c)
then it look aligned. (Haven’t tried theis_latex_enabled()
yet)