# Failing to plot correlograms in Julia: Makie vs. AoG vs StatsPlots

**URL:** <https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971>\
**Category:** New to Julia\
**Tags:** plotting, statsplots, makie, algebraofgraphics\
**Created:** [December 23, 2023, 12:42pm UTC](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971 "2023-12-23T12:42:22Z")\
**Posts on this page:** 1\
**Showing post:** 23

<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, 7:04pm UTC](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971/23 "2023-12-28T19:04:57Z")

</div>

I just added support to PairPlots.jl for plotting a linear trend line:

```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/f/9/f9c0fc127d8e25e12deb8df2cbc911d6322bfa41.jpeg)

It just fits a linear trend line for now, but I can imagine extending this in future. We should probably add a package extension to support GLM directly.

You can test it out by running `] add PairPlots#main`. I’ll tag a new release the docs are built.

Let me know if there’s anything else I can add.

---

_[View the full topic](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971)._
