# Raw"\\nabla" fails in labels

**URL:** <https://discourse.julialang.org/t/raw-nabla-fails-in-labels/109739>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [February 5, 2024, 2:57pm UTC](https://discourse.julialang.org/t/raw-nabla-fails-in-labels/109739 "2024-02-05T14:57:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blob](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@blob](https://discourse.julialang.org/u/blob)\
**Post date:** [February 5, 2024, 2:57pm UTC](https://discourse.julialang.org/t/raw-nabla-fails-in-labels/109739/1 "2024-02-05T14:57:18Z")

</div>

I am trying to get “nice” labels for a plot and the unicode characters work properly only sometimes:

```julia
using Plots

plot(rand(10),label="δ works")                             
plot!(rand(10),label=raw"\delta works")                             
plot!(rand(10),label="∇ works")  
plot!(rand(10),label=raw"\nabla doesn't work")                             

```

which gives:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/b/fb8413c11083a938c92233ad2c5511649e255979.png)

What’s the difference between `\delta` and `\nabla` that makes the label fail?

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [February 5, 2024, 3:07pm UTC](https://discourse.julialang.org/t/raw-nabla-fails-in-labels/109739/2 "2024-02-05T15:07:35Z")

</div>

The `\n` makes a newline. `\d` doesn’t have such a special meaning. Normally the `raw` string should prevent that interpretation, but this looks to be a bug.

---

<div class="post-metadata">

**Author:** ![aryavorskiy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aryavorskiy/32/43466_2.png) [@aryavorskiy](https://discourse.julialang.org/u/aryavorskiy)\
**Post date:** [February 5, 2024, 3:09pm UTC](https://discourse.julialang.org/t/raw-nabla-fails-in-labels/109739/3 "2024-02-05T15:09:49Z")

</div>

Probably some parser issue. Consider using LaTeX notation:

```julia
using Plots

plot(rand(10),label="δ works")                             
plot!(rand(10),label=raw"LaTeX $\delta$ works")                             
plot!(rand(10),label="∇ works")  
plot!(rand(10),label=raw"LaTeX $\nabla$ works")

```

This will give the following:  
 ![lol](https://global.discourse-cdn.com/julialang/original/3X/4/f/4fed159c62f48206755ce25e7ce5a9d8130e8618.png)

Edit: seems like we have Plots.jl to blame, because it tries to process escape literals even in a raw string.
