# Nice fonts with Plots, GR and LaTeXStrings

**URL:** https://discourse.julialang.org/t/nice-fonts-with-plots-gr-and-latexstrings/60037
**Category:** Visualization
**Tags:** latex, plots, gr
**Created:** [April 26, 2021, 2:41pm UTC](https://discourse.julialang.org/t/nice-fonts-with-plots-gr-and-latexstrings/60037 "2021-04-26T14:41:09Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [May 3, 2021, 10:22am UTC](https://discourse.julialang.org/t/nice-fonts-with-plots-gr-and-latexstrings/60037/12 "2021-05-03T10:22:19Z")

</div>

@lmiq, thanks for this very useful post.  
In case it might be of interest, the following example provides some additional formatting options:

```julia
using LaTeXStrings, Printf, Plots; gr()

plot_font = "Computer Modern";
default(fontfamily=plot_font,framestyle=:box, label=nothing, grid=false, tickfontsize=7)

u = 15 # persistent wind speed in m/s (~30 knot)
st0 = "Significant wave height vs persistent wind speed ("
st1 = @sprintf(": u = %i m/s → ", u)
st2 = @sprintf(" = %.1f m", 0.24*u^2/9.8)
plot(title=L"\textbf{%$st0} \mathbf{H_s \approx 0.24 u^2/g} ) \textit{%$st1} {H_s} \textit{%$st2}", titlefont=font(8,plot_font))
plot!(ylims=(0,30))

```

To produce:

 ![Plots_LaTeXStrings_title_bold_and_italic](https://global.discourse-cdn.com/julialang/original/3X/e/8/e82b773a6e1ffd4166632c826ae521781254a0dc.png)

---

_[View the full topic](https://discourse.julialang.org/t/nice-fonts-with-plots-gr-and-latexstrings/60037)._
