# Plot xlabel and ylabel fontsize and fontweight

**URL:** https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739
**Category:** General Usage
**Created:** [December 27, 2019, 10:04am UTC](https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739 "2019-12-27T10:04:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![imrankhan\_juliaLang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imrankhan_julialang/32/12020_2.png) [@imrankhan\_juliaLang](https://discourse.julialang.org/u/imrankhan_juliaLang)
#### Post date: [December 27, 2019, 10:04am UTC](https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739/1 "2019-12-27T10:04:57Z")

</div>

how can i change fontsize and fontweight in xlabel and ylabel

![pbb1](https://global.discourse-cdn.com/julialang/original/3X/7/2/72a360b93f32e6ea8aa1ba5dedff5b6ac76ddecd.png)

---

<div class="post-metadata">

### Author: ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)
#### Post date: [December 27, 2019, 2:14pm UTC](https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739/2 "2019-12-27T14:14:05Z")

</div>

What plotting package are you using? If you’re asking about Plots.jl, see `guidefontsize` from here:

[http://docs.juliaplots.org/latest/attributes/](http://docs.juliaplots.org/latest/attributes/)

Posting a minimal working example would be a good idea too 😉

---

<div class="post-metadata">

### Author: ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)
#### Post date: [December 27, 2019, 9:16pm UTC](https://discourse.julialang.org/t/plot-xlabel-and-ylabel-fontsize-and-fontweight/32739/3 "2019-12-27T21:16:38Z")

</div>

The Plots package does not seem to have an option for the font weight.  
Quick&dirty solution using the PyPlot package:

```julia
using Plots
pyplot()
import PyPlot
rcParams = PyPlot.PyDict(PyPlot.matplotlib."rcParams")
font0 = Dict(
        "font.size" => 18,
        "axes.labelweight" => "bold",
        "axes.labelsize" => 16,
        "xtick.labelsize" => 8,
        "ytick.labelsize" => 8,
        "legend.fontsize" => 12,
)
merge!(rcParams, font0)
#############################################################

plt0 = plot(rand(10), rand(10), label="label 1", xlabel="x label", ylabel="y label", title="title")

```
