# Axis label skewed and wrongly positioned when setting guidefont

**URL:** <https://discourse.julialang.org/t/axis-label-skewed-and-wrongly-positioned-when-setting-guidefont/35116>\
**Category:** Visualization\
**Created:** [February 25, 2020, 2:24pm UTC](https://discourse.julialang.org/t/axis-label-skewed-and-wrongly-positioned-when-setting-guidefont/35116 "2020-02-25T14:24:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlanghinrichs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mlanghinrichs/32/50371_2.png) [@mlanghinrichs](https://discourse.julialang.org/u/mlanghinrichs)\
**Post date:** [February 25, 2020, 2:24pm UTC](https://discourse.julialang.org/t/axis-label-skewed-and-wrongly-positioned-when-setting-guidefont/35116/1 "2020-02-25T14:24:58Z")

</div>

Hi all,

I noticed that my x axis label is somehow weirdly positioned and rotated when setting a particular font as guidefont (plot `p2`). I’m using the Plots.jl package with the GR backend. In case I don’t set the guidefont everything looks fine (plot `p1`). Please see an example code, versions and images below. I’m glad for any help on what is going on here.

Best

```julia
using Plots
gr()

# plot p1: everything looks fine
fnt = Plots.font("Helvetica", 12.0)
p1=plot(legend=false, grid=false, legendfont=fnt, xtickfont=fnt, ytickfont=fnt, margin=6Plots.mm);
plot!([1,2,3], [1,2,3]);
ylabel!("my y label");
xlabel!("my x label");
display(p1)
savefig(p1, "test1.pdf")

# plot p2: when setting guidefont=fnt, x axis label looks weird
fnt = Plots.font("Helvetica", 12.0)
p2=plot(legend=false, grid=false, guidefont=fnt, legendfont=fnt, xtickfont=fnt, ytickfont=fnt, margin=6Plots.mm);
plot!([1,2,3], [1,2,3]);
ylabel!("my y label");
xlabel!("my x label");
display(p2)
savefig(p2, "test2.pdf")

# verions:
VERSION # Julia: v"1.3.1"
pkgs = Pkg.installed()
pkgs["Plots"] # Plots: v"0.28.4"

```

p1 plot:  
 ![test1](https://global.discourse-cdn.com/julialang/original/3X/1/e/1e7ed5ee6e0f118de956b6c9c2c7ea141a6776de.png)

p2 plot:  
 ![test2](https://global.discourse-cdn.com/julialang/original/3X/b/1/b136b429c0a67d9716a8cb4cd4b7374825932ccb.png)

EDIT: It actually also affects the legend labels when `legend=true`. See image:

![test2](https://global.discourse-cdn.com/julialang/original/3X/8/6/869653e4732b5a7644fc2c841193594dab4561d0.png)
