# Text wrap in Makie?

**URL:** <https://discourse.julialang.org/t/text-wrap-in-makie/92631>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [January 7, 2023, 12:05pm UTC](https://discourse.julialang.org/t/text-wrap-in-makie/92631 "2023-01-07T12:05:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Norberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jon_norberg/32/3218_2.png) [@Jon\_Norberg](https://discourse.julialang.org/u/Jon_Norberg)\
**Post date:** [January 7, 2023, 12:05pm UTC](https://discourse.julialang.org/t/text-wrap-in-makie/92631/1 "2023-01-07T12:05:14Z")

</div>

Looking at documentation for Makie text there is a keyword for text wrapping: `word_wrap_with::Real = -1`. I need a bit of explanatory text in one panel but I cannot get the wrap to work. Any one has an idea how to fix that (M[not]WE below)? Also, can I change font of the text, i.e. times or Helvetica in addition to e.g. :regular?

```julia
	f=Figure()
	a1=Axis(f[1,1])
	xlims!(a1,(0,100))
	ylims!(a1,(0,100))
	hidedecorations!(a1)
	hidespines!(a1)
	text!(5,95,text="a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text,a whole lot of text",word_wrap_with=50, font=:regular, fontsize=20)
	a2=Axis(f[1,2])
	xlims!(a2,(0,100))
	ylims!(a2,(0,100))
	f

```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [January 7, 2023, 1:11pm UTC](https://discourse.julialang.org/t/text-wrap-in-makie/92631/2 "2023-01-07T13:11:18Z")

</div>

> [@Jon\_Norberg](#):
>
> `word_wrap_with`

`word_wrap_width` with a “d”

And doesn’t `font = "Helvetica"` work?

To see how to change fonts across a whole Figure, check [https://docs.makie.org/stable/documentation/fonts/#symbol](https://docs.makie.org/stable/documentation/fonts/#symbol)

---

<div class="post-metadata">

**Author:** ![Jon\_Norberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jon_norberg/32/3218_2.png) [@Jon\_Norberg](https://discourse.julialang.org/u/Jon_Norberg)\
**Post date:** [January 7, 2023, 3:04pm UTC](https://discourse.julialang.org/t/text-wrap-in-makie/92631/3 "2023-01-07T15:04:20Z")

</div>

Hah, I was wondering why it said `word_wrap_with` in the documentation 😃 Thanks. And yes, font=“Helvetica” did work, since the example had font=:regular I tried font=:Helvetica… Many thanks!

Documentation misspelling here: [text](https://docs.makie.org/v0.19.1/examples/plotting_functions/text/index.html#text)
