# Plots -- bug in LaTeX symbol of PyPlot?

**URL:** <https://discourse.julialang.org/t/plots-bug-in-latex-symbol-of-pyplot/43889>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [July 29, 2020, 2:49pm UTC](https://discourse.julialang.org/t/plots-bug-in-latex-symbol-of-pyplot/43889 "2020-07-29T14:49:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [July 29, 2020, 2:49pm UTC](https://discourse.julialang.org/t/plots-bug-in-latex-symbol-of-pyplot/43889/1 "2020-07-29T14:49:44Z")

</div>

I want to “check” a symbol in Plots legends, e.g., \check{S}. However, in plots generated by Julia with PyPlot back-end, this appears as:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/1/d16c19fc7141868e59019b179a4566fd4e0eb813.png)

If I replace “check” with, say, “hat”, \hat{S}, the symbol is rendered correctly.

Question: Does anyone have a clue as to how I can fix this?

NOTE: switching to the GR backend does not solve the problem – GR supports fewer LaTeX symbols than PyPlot. (I’m also using \mathsf{R} – the mathsf style, which PyPlot handles but not GR.)

NOTE2: PyPlot handles the “breve” decoration, e.g., \breve{S}, but I prefer the “check” decoration…, and I don’t understand why “check” doesn’t work.

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [July 30, 2020, 1:27am UTC](https://discourse.julialang.org/t/plots-bug-in-latex-symbol-of-pyplot/43889/2 "2020-07-30T01:27:07Z")

</div>

The check accent is not supported by the TeX-like system in matplotlib (which underlies PyPlot).  
You could patch your local copy as shown in the discussion at  
[https://github.com/matplotlib/matplotlib/issues/7738](https://github.com/matplotlib/matplotlib/issues/7738)

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [July 30, 2020, 8:18am UTC](https://discourse.julialang.org/t/plots-bug-in-latex-symbol-of-pyplot/43889/3 "2020-07-30T08:18:06Z")

</div>

Weird that “\check” and “\not” are not supported…

Anyway, I checked the link you suggested, and based on the suggestion:

![image001.png](https://global.discourse-cdn.com/julialang/original/3X/0/3/0359bdb2d84c2b75f8e96c3823e7a9670968c3a8.png)

I tried:

![image002.png](https://global.discourse-cdn.com/julialang/original/3X/1/0/1067202ad0ee4ae8d1b2236ab8d4f4208969bcd1.png)

which lead to a lengthy recompilation time, and then an error message.

I _ **assume** _, however, that what you meant is the second proposal:

 ![image003.png](https://global.discourse-cdn.com/julialang/original/3X/4/4/449c7b93f96331ceba66b50b43257e0f68b933cf.png)

So I guess you suggest that I go into the matplotlib code on my computer (wherever that is) and insert the line

r’check’ : r’\check’,

I hope that does not have a side-effect… (and I guess I have to do it on every computer I use).

On my _ **work** _ computer, I find _ **two** _ files with name “mathtext.py”. One at

![image005.png](https://global.discourse-cdn.com/julialang/original/3X/9/f/9fc6919dff5a8f53362b8c4950ffac8212b244ba.png)

and the other at

![image006.png](https://global.discourse-cdn.com/julialang/original/3X/5/6/561cc5c101da86c3fc9ae83dcc6487bed9a867fa.png)

Does it matter which one I patch, or should I patch both?

There, I find:

![image004.png](https://global.discourse-cdn.com/julialang/original/3X/7/6/76e72cd53551b42d1e3403098e244256f9812c9e.png)

So it seems like for some reason, “check” has not been included here…

Anyway, would:

r’check’: r’\check’,

suffice (as in the proposal above), or would I need

r’check’: r’\combiningcheck’,

??

Do I need to re-issue “using Plots” and “PyPlot()” again to make it work?

-B
