# What is the difference between \`using Plots; gr()\` and "using GR"?

**URL:** <https://discourse.julialang.org/t/what-is-the-difference-between-using-plots-gr-and-using-gr/82947>\
**Category:** General Usage\
**Created:** [June 18, 2022, 1:04am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-using-plots-gr-and-using-gr/82947 "2022-06-18T01:04:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raymond](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raymond/32/36557_2.png) [@Raymond](https://discourse.julialang.org/u/Raymond)\
**Post date:** [June 18, 2022, 1:04am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-using-plots-gr-and-using-gr/82947/1 "2022-06-18T01:04:21Z")

</div>

Dear all,

we can use GR backend,

```julia
using Plots
gr()

```

we can also directly use

```julia
using GR

```

So what is the difference between two kinds of code?

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [June 18, 2022, 1:45am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-using-plots-gr-and-using-gr/82947/2 "2022-06-18T01:45:51Z")

</div>

Plots.jl is a package that provides a standard interface to various plotting libraries, among them GR.

So in the end you may be able to do the same things but the syntax to achieve the same thing `using GR` will be different than what you need to write if you use `using Plots`. The difference is that if you write it using Plots.jl you can just switch your plotting library and the same code will work for the other backends.

---

<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 18, 2022, 5:44am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-using-plots-gr-and-using-gr/82947/3 "2022-06-18T05:44:16Z")

</div>

That, and plot recipes defined in other packages will work with Plots, but not with GR
