# Why is the ticks fontfamily not changing?

**URL:** <https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814>\
**Category:** General Usage\
**Tags:** question, pyplot, plots, fonts\
**Created:** [August 15, 2023, 3:35am UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814 "2023-08-15T03:35:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SYSYS33](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sysys33/32/52242_2.png) [@SYSYS33](https://discourse.julialang.org/u/SYSYS33)\
**Post date:** [August 15, 2023, 3:35am UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814/1 "2023-08-15T03:35:39Z")

</div>

I am using Julia 1.9.2, Plots v1.38.17, PyPlot v2.11.1.  
When I plot, the font of the tick labels doesn’t change.  
Not working “fontfamily” and “tickfontfamily”.  
Is this a bug in the new version of Julia, or is there a different command I should use?

```julia
using Plots
pyplot()

x = 1:10;
y = rand(10);
plot(x, y,
    xlabel = "x",
    ylabel = "y",
    fontfamilys = "Times New Roman",
    tickfontfamily = "Times New Roman")

```

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

Please help me.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [August 15, 2023, 1:15pm UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814/2 "2023-08-15T13:15:14Z")

</div>

I don’t know about those specific commands to change the fonts (I’m not sure if they exist), but you may want to take a look at these tips to make the plot more consistent:

[https://m3g.github.io/JuliaNotes.jl/stable/figures/](https://m3g.github.io/JuliaNotes.jl/stable/figures/)

---

<div class="post-metadata">

**Author:** ![SYSYS33](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sysys33/32/52242_2.png) [@SYSYS33](https://discourse.julialang.org/u/SYSYS33)\
**Post date:** [August 16, 2023, 1:03am UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814/3 "2023-08-16T01:03:07Z")

</div>

Thank you for your reply.  
However, the tick labels still haven’t changed.

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [August 16, 2023, 2:37am UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814/4 "2023-08-16T02:37:42Z")

</div>

This is a hack that you can use until you get a better solution. Specify the tick labels yourself:

```julia
using Plots
pyplot()

x = 1:10
y = rand(10)
plot(x, y,
    guidefontsize = 12, tickfontsize = 10,
    xtick = (2:2:10, ["2", "4", "6", "8", "10"]),
    ytick = (0.2:0.2:1, ["0.2", "0.4", "0.6", "0.8", "1.0"]),
    xlabel = "x",
    ylabel = "y",
    fontfamily = "Times New Roman")

```

![plot](https://global.discourse-cdn.com/julialang/original/3X/4/b/4b4baaa7c868253930439ed8ecb5bc21d828c41d.png)

---

<div class="post-metadata">

**Author:** ![SYSYS33](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sysys33/32/52242_2.png) [@SYSYS33](https://discourse.julialang.org/u/SYSYS33)\
**Post date:** [August 16, 2023, 5:42am UTC](https://discourse.julialang.org/t/why-is-the-ticks-fontfamily-not-changing/102814/5 "2023-08-16T05:42:50Z")

</div>

Thank you.  
This solution is work.
