# Plots -\> PgfPlotsX: Inserting a legend title?

**URL:** <https://discourse.julialang.org/t/plots-pgfplotsx-inserting-a-legend-title/48710>\
**Category:** New to Julia\
**Tags:** pgfplotsx\
**Created:** [October 20, 2020, 9:56pm UTC](https://discourse.julialang.org/t/plots-pgfplotsx-inserting-a-legend-title/48710 "2020-10-20T21:56:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [October 20, 2020, 9:56pm UTC](https://discourse.julialang.org/t/plots-pgfplotsx-inserting-a-legend-title/48710/1 "2020-10-20T21:56:49Z")

</div>

Hi!

I am `using Plots` with the `pgfplotsx()` option. Is it possible to easily add a legend title using this package?

Something like this:

![image](https://global.discourse-cdn.com/julialang/original/3X/1/4/1435b043421470020b220e32e6723faa749e6e32.png)  
(Not my picture found here [https://statisticsglobe.com/change-legend-title-ggplot-r](https://statisticsglobe.com/change-legend-title-ggplot-r) )

I only care about solutions for the PgfPlotsX package, since I am using this plotting package for all my other plots.

I am aware of the option of starting from an empty tikz document and building everything manually using PgfPlotsX, but this seems cumbersome when I only need to do this one thing.

Kind regards

---

<div class="post-metadata">

**Author:** ![BeastyBlacksmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beastyblacksmith/32/4741_2.png) [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)\
**Post date:** [October 20, 2020, 10:33pm UTC](https://discourse.julialang.org/t/plots-pgfplotsx-inserting-a-legend-title/48710/2 "2020-10-20T22:33:17Z")

</div>

Should be as easy as `plot(1:5, legendtitle = "Title")`
