-
Notifications
You must be signed in to change notification settings - Fork 245
Closed
Labels
Description
When adding prediction intervals to my plot via geom_ribbon(), I noticed that geom_ribbon() does not add an outline to the upper end of the shaded area when setting either outline_type="both" or outline_type="upper". It works, however, when setting outline_type="full".
Reproducible example:
from plotnine import *
import polars as pl
df = pl.DataFrame({
"x": [1, 2, 3, 4, 5],
"y": [100, 120, 90, 105, 115],
"lower": [90, 110, 80, 95, 105],
"upper": [110, 130, 100, 115, 125]
})
(
ggplot(df, aes(x="x", y="y"))
+ geom_line()
+ geom_ribbon(
aes(ymin="lower", ymax="upper"),
alpha=0.3,
color="red",
fill="gray",
outline_type="both"
)
)This leads to a shaded area with only an outline in the lower part:

Using plotnine 0.12.4 and mizani 0.9.3 on Python 3.11.5.
Reactions are currently unavailable