# Fill a bounding box of a text in Makie

**URL:** <https://discourse.julialang.org/t/fill-a-bounding-box-of-a-text-in-makie/60640>\
**Category:** Visualization\
**Tags:** question, makie\
**Created:** [May 6, 2021, 10:47am UTC](https://discourse.julialang.org/t/fill-a-bounding-box-of-a-text-in-makie/60640 "2021-05-06T10:47:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [May 6, 2021, 10:54am UTC](https://discourse.julialang.org/t/fill-a-bounding-box-of-a-text-in-makie/60640/2 "2021-05-06T10:54:43Z")

</div>

I now realize that this might not be simple/easy as attested by

> [@Makie.jl: Plotting contour with fillrange=true above lines](https://discourse.julialang.org/t/makie-jl-plotting-contour-with-fillrange-true-above-lines/39830/6):
>
> Not as easily… I think @jules did some work on this? I just did a super dirty hack for a simple version: using AbstractPlotting, GLMakie np = 500 nc = 200 f(x) = 2\*x+1 x = LinRange(-1,1,f(np)) y = rand(f(np))\*2 .- 1 scene = Scene() x\_c = LinRange(-nc/np,nc/np,f(nc)) y\_c = LinRange(-nc/np,nc/np,f(nc)) c\_mat = @. x\_c^2 + y\_c'^2 lineplot = lines!(scene, x, y)[end] translate!(lineplot, 0, 0, -1) heatmap!(scene,x\_c,y\_c,c\_mat) cplot = contour!(scene,x\_c,y\_c,c\_mat, linewidth=2, color=:whit…

and

> <https://github.com/MakieOrg/Makie.jl/issues/832>
>
> I don't think one can annotate contours with values in Makie (yet), for example …(matplotlib):
> 
> \<img width=50% src="https://matplotlib.org/3.3.3/\_images/sphx\_glr\_contour\_demo\_001.png"\>
> 
> I could not find an existing issue for this, so I thought I'd create one! 😃 
> 
> \---
> 
> FWIW, I only found \[this discourse post\](https://discourse.julialang.org/t/makie-jl-plotting-contour-with-fillrange-true-above-lines/39830/6) with a potential workaround, with this plot:
> 
> \<img width=50% src="https://aws1.discourse-cdn.com/business5/uploads/julialang/original/2X/d/d55de321c4d7d36c52319a76555617afb4cf5059.png"\>

---

_[View the full topic](https://discourse.julialang.org/t/fill-a-bounding-box-of-a-text-in-makie/60640)._
