# \[ANN\] A Package for Generating Corner Plots (PairPlots.jl)

**URL:** <https://discourse.julialang.org/t/ann-a-package-for-generating-corner-plots-pairplots-jl/58542>\
**Category:** Package Announcements\
**Tags:** plotting\
**Created:** [April 4, 2021, 3:36am UTC](https://discourse.julialang.org/t/ann-a-package-for-generating-corner-plots-pairplots-jl/58542 "2021-04-04T03:36:53Z")\
**Posts on this page:** 1\
**Showing post:** 32

<div class="post-metadata">

**Author:** ![sefffal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sefffal/32/23640_2.png) [@sefffal](https://discourse.julialang.org/u/sefffal)\
**Post date:** [December 28, 2023, 10:22pm UTC](https://discourse.julialang.org/t/ann-a-package-for-generating-corner-plots-pairplots-jl/58542/32 "2023-12-28T22:22:22Z")

</div>

Announcing a new minor release (that should be in the registry soon).

## New Feature: Trend Lines

This release added support for displaying simple linear trend lines fit to each pair of variables, skipping any missing values.

See [Failing to plot correlograms in Julia: Makie vs. AoG vs StatsPlots - #23 by sefffal](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971/23) for the discussion that prompted this addition.

```julia
pairplot(
    table => (
        # choose what kind of series you want in body and along diagonal
        PairPlots.Scatter(),
        PairPlots.MarginHist(),
        # Add trend line
        PairPlots.TrendLine(color=:red),
    ),
    fullgrid=true
)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/7/870fc9b2bddc8fe12faf784ea2cba0aa5640dc08.jpeg)

If the data is ill conditioned (such that calculating the line results in a singular exception, then no line is displayed.

I’m interested to expand on this in future. I can imagine wanting to see the formula, correlation coefficient, etc, as well as display arbitrarily complex models.

Perhaps this could be added via extension packages, eg for GLM.jl.

I’d be interested to hear what the community thinks would be a good approach.

---

_[View the full topic](https://discourse.julialang.org/t/ann-a-package-for-generating-corner-plots-pairplots-jl/58542)._
