# Inconsistent Figure size when using Plots and gr()

**URL:** <https://discourse.julialang.org/t/inconsistent-figure-size-when-using-plots-and-gr/62490>\
**Category:** VS Code\
**Tags:** plotting\
**Created:** [June 7, 2021, 4:25am UTC](https://discourse.julialang.org/t/inconsistent-figure-size-when-using-plots-and-gr/62490 "2021-06-07T04:25:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://discourse.julialang.org/u/loki)\
**Post date:** [June 7, 2021, 4:25am UTC](https://discourse.julialang.org/t/inconsistent-figure-size-when-using-plots-and-gr/62490/1 "2021-06-07T04:25:31Z")

</div>

Hello,

Recently I’ve been running into an issue regarding the size of a figure being inconsistent when I use Plots.jl and gr() as the back-end. Essentially the issues is that when I try to plot anything it appears very small in the plot plane, I can change the size of it by passing in size = (…,…) but now the font and axes will be incredibly small. In addition, moving around the plot plane doesn’t affect the relative size of the plot which it normally would. However, if I plot the exact same thing using plotly() the figure size will appear normal. Thinking that I may have change some setting, I’ve tried exiting the REPL and loading in just Plots.jl, some times this fixes the issue but it doesn’t seem to be consistent.

If any one has any recommendations on how to address this issue or suggestions on how to work around this without switching back-ends. It would be greatly appreciated!

Thank you!

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [June 7, 2021, 5:57am UTC](https://discourse.julialang.org/t/inconsistent-figure-size-when-using-plots-and-gr/62490/2 "2021-06-07T05:57:51Z")

</div>

Is it this?

> <https://github.com/jheinen/GR.jl/issues/385>
>
> I don't know if this is specific to my system (i3wm on Arch linux).
> 
> No matter… the dimensions of the plot, GR reserves a square area for it in the window. This means that if the window is resized the figure is sometimes needlessly scaled down. This figure, for instance, could easily fill the window better but since it's trying to fit a square viewport it leaves a lot of empty space:
> 
> !\[image\](https://user-images.githubusercontent.com/6677110/113898623-53cd0600-97cc-11eb-98b5-3f7352c35fc4.png)
> 
> Here's the same problem for a call \`using Plots;gr();plot(randn(10,10); title="hi", size=(300,600))\`:
> 
> !\[image\](https://user-images.githubusercontent.com/6677110/113899062-b7573380-97cc-11eb-9df0-f135be09a5d9.png)
> 
> Is this a limitation in QtTerm, a bug or a specific issue with i3?

---

<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:** [June 7, 2021, 6:48am UTC](https://discourse.julialang.org/t/inconsistent-figure-size-when-using-plots-and-gr/62490/3 "2021-06-07T06:48:09Z")

</div>

You are probably using an old `GR.jl` version or GR run-time.

- `Plots.GR.version()` should be `0.57.3`
- The `GR.jl` version should be `v0.57.5` (check with `] st GR`)

---

<div class="post-metadata">

**Author:** ![loki](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@loki](https://discourse.julialang.org/u/loki)\
**Post date:** [June 7, 2021, 3:02pm UTC](https://discourse.julialang.org/t/inconsistent-figure-size-when-using-plots-and-gr/62490/4 "2021-06-07T15:02:49Z")

</div>

Thank you for the suggestion! I was indeed running an older version of `GR.jl` specifically version `v0.52.0`. I’ve updated it to `v0.57.5` with `] update GR` and that took care of the issue!
