# Plots title offset (pyplot)

**URL:** https://discourse.julialang.org/t/plots-title-offset-pyplot/74250
**Category:** Visualization
**Tags:** pyplot, plots
**Created:** [January 8, 2022, 5:43pm UTC](https://discourse.julialang.org/t/plots-title-offset-pyplot/74250 "2022-01-08T17:43:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jamblejoe](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)
#### Post date: [January 8, 2022, 5:43pm UTC](https://discourse.julialang.org/t/plots-title-offset-pyplot/74250/1 "2022-01-08T17:43:34Z")

</div>

How do I offset titles in `Plots.jl`? For example when the title overlaps with the colorbar

```julia
using Plots
pyplot()
heatmap(rand(100,100); title="title", titlefontsize=40, colorbar=:top)

```

produces something like  
 ![plot_7](https://global.discourse-cdn.com/julialang/original/3X/b/5/b573260f5e2ae02e005ac25b160b453479cfd00c.png)

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [January 8, 2022, 7:32pm UTC](https://discourse.julialang.org/t/plots-title-offset-pyplot/74250/2 "2022-01-08T19:32:11Z")

</div>

One common workaround in Plots.jl is to subplot:

```julia
using Plots; pyplot()
p1 = plot(title="title", titlefontsize=40, axis=nothing, framestyle=:none);
p2 = heatmap(rand(100,100), ratio=1);
plot(p1, p2, layout = grid(2, 1, heights=[-0.2, 1]), cb=:top)

```

 ![Plots_pyplot_title_in_subplot](https://global.discourse-cdn.com/julialang/original/3X/0/3/03ff2c2a5db35fc215adda59ccd59840cd03d239.png)

_ **NB:** _  
_You may want to further fine tune the relative heights_

---

<div class="post-metadata">

### Author: ![jamblejoe](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)
#### Post date: [January 9, 2022, 2:19pm UTC](https://discourse.julialang.org/t/plots-title-offset-pyplot/74250/3 "2022-01-09T14:19:47Z")

</div>

That is a neat solution. I used for my particular case `annotate!` and some hacky x/y-coordinates. Thank you!
