Closed 123-fake-st closed 2 months ago
While working on a submission for the 2024 Plotnine Contest, I noticed that specifying lineend='round' in a geom_segment has no effect. It appears that geom_segment does not pass on the value of lineend.
lineend='round'
geom_segment
lineend
import polars as pl import plotnine as p9 plot_data = pl.DataFrame({ 'x': range(1, 6), 'xend': range(2, 7), 'y': range(1, 6), 'z': range(1, 6) }) plot = ( p9.ggplot(plot_data, p9.aes(x='x', xend='xend', y='y', yend='y', color='z')) + p9.labs(caption='Color gradient testing') + p9.geom_segment(size=8, lineend='round', raster=True) ) plot.show()
This appears similar to #727 and checking the code, I believe it can be fixed similarly to https://github.com/has2k1/plotnine/commit/18b748fab0c8b0c6e9ab28090982ecf2c054cefc by modifying geom_segment to include:
capstyle=params["lineend"],
Happy to fork, test, and submit a pull request but it will take me a little time to get around to it.
While working on a submission for the 2024 Plotnine Contest, I noticed that specifying
lineend='round'
in ageom_segment
has no effect. It appears thatgeom_segment
does not pass on the value oflineend
.This appears similar to #727 and checking the code, I believe it can be fixed similarly to https://github.com/has2k1/plotnine/commit/18b748fab0c8b0c6e9ab28090982ecf2c054cefc by modifying
geom_segment
to include:Happy to fork, test, and submit a pull request but it will take me a little time to get around to it.