# Supported (Latex like) fontfamilies Plots.jl GR.jl

**URL:** <https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [April 8, 2019, 10:25pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938 "2019-04-08T22:25:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![YoungFaithful](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/youngfaithful/32/6237_2.png) [@YoungFaithful](https://discourse.julialang.org/u/YoungFaithful)\
**Post date:** [April 8, 2019, 10:25pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/1 "2019-04-08T22:25:47Z")

</div>

Hi all,  
I’m trying to figure out which fontfamilies can be used with Plots.jl using GR.jl. Is it system dependent? I am looking specifically for a “Computer Modern” like family. I couldn’t find a list or explanation what could be used and would really appreciate your help to figure that out.

Minimal working example would be:

```julia
using Plots
plot(collect(1:10),fontfamily="Times")

```

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [April 9, 2019, 7:27am UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/2 "2019-04-09T07:27:33Z")

</div>

[http://gr-framework.org/fonts.html?highlight=font](http://gr-framework.org/fonts.html?highlight=font)

---

<div class="post-metadata">

**Author:** ![wsrinin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsrinin/32/7676_2.png) [@wsrinin](https://discourse.julialang.org/u/wsrinin)\
**Post date:** [April 9, 2019, 12:08pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/3 "2019-04-09T12:08:59Z")

</div>

I typically use Latin Modern Math in Makie. In Makie at least you can use every font installed on your computer.

---

<div class="post-metadata">

**Author:** ![Oto\_Brzobohaty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oto_brzobohaty/32/10370_2.png) [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Post date:** [October 22, 2020, 10:22am UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/4 "2020-10-22T10:22:55Z")

</div>

Computer modern font is supported by GR but I don’t know how to set it in Plots.

```julia
plot(collect(1:10),fontfamily="Computer Modern")

```

is not working.

Any idea?

---

<div class="post-metadata">

**Author:** ![Oto\_Brzobohaty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oto_brzobohaty/32/10370_2.png) [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Post date:** [October 23, 2020, 6:29pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/5 "2020-10-23T18:29:21Z")

</div>

I went through the Plots/gr.jl code and I found that computer modern font is there but you need to set the font family to

```julia
plot!(fontfamily="serif-roman") 

```

---

<div class="post-metadata">

**Author:** ![daschw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daschw/32/2926_2.png) [@daschw](https://discourse.julialang.org/u/daschw)\
**Post date:** [October 23, 2020, 7:03pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/6 "2020-10-23T19:03:26Z")

</div>

Soon we will also support

```julia
plot(collect(1:10),fontfamily="Computer Modern")

```

([https://github.com/JuliaPlots/Plots.jl/pull/3096](https://github.com/JuliaPlots/Plots.jl/pull/3096))

---

<div class="post-metadata">

**Author:** ![Oto\_Brzobohaty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oto_brzobohaty/32/10370_2.png) [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Post date:** [October 24, 2020, 6:10pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/7 "2020-10-24T18:10:47Z")

</div>

I compared the axis fonts in figure plotted by gr() backend and pgfplots() backend and I think that the gr() has smaller spaces between characters. Please compare in figure.

 ![pgf_vs_gr](https://global.discourse-cdn.com/julialang/original/3X/9/a/9a41b59fec8797c491a2094a497402531bda58bc.png)

From my perspective, the original latex spacing is better to read. Is there way how to set it?

---

<div class="post-metadata">

**Author:** ![daschw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daschw/32/2926_2.png) [@daschw](https://discourse.julialang.org/u/daschw)\
**Post date:** [October 24, 2020, 10:03pm UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/8 "2020-10-24T22:03:06Z")

</div>

cc: @jheinen

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [October 27, 2020, 11:35am UTC](https://discourse.julialang.org/t/supported-latex-like-fontfamilies-plots-jl-gr-jl/22938/9 "2020-10-27T11:35:17Z")

</div>

We will check this, but, unfortunately, we can’t offer a short-term solution.
