# Trouble using Plots (on Linux)

**URL:** <https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061>\
**Category:** New to Julia\
**Tags:** linux, plots\
**Created:** [November 10, 2022, 5:36pm UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061 "2022-11-10T17:36:33Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Schneeschaufel](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Schneeschaufel](https://discourse.julialang.org/u/Schneeschaufel)\
**Post date:** [November 10, 2022, 8:54pm UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/22 "2022-11-10T20:54:30Z")

</div>

But isn’t ggplot2 something specific to R?

What I meant is was that in Python-numpy land matplotlib is the major player.

I have never met anyone who actually likes matplotlib but this is what is mainly being used when people use numpy.

Personally I never liked the appearance of R plots. I know a lot is personal preference. The best looking plots produced the IDL data language (although most would disagree with me on that point).

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [November 10, 2022, 10:10pm UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/23 "2022-11-10T22:10:16Z")

</div>

Hey @Schneeschaufel — I totally get your frustration. This is something that the Plots.jl (and GR.jl) folks try very hard to make work out of the box for everyone. And yes, in rare situations it doesn’t work. If you want to debug the problems and try to smooth it out (for yourself and potentially others who come after you), folks are already trying to help you do so right here. Simply saying that Plots has a lot of problems on a given platform is not helpful — most of us do not encounter lots of problems on a regular basis.

> [@Schneeschaufel](#):
>
> Why don’t the Julia stewards declare that pyplot shall be the main Julia plotting library?

The only thing special about “Plots” is its name. It’s not specially blessed by the Julia stewards (who really just help set community standards) nor the core language developers. You’re free to use PyPlot, Makie or any other library. If your administrator has chosen Plots as the one and only plotting package available to you on your locked-down system, you should bring that up with them.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [November 10, 2022, 10:10pm UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/24 "2022-11-10T22:10:28Z")

</div>

> [@Schneeschaufel](#):
>
> Why don’t the Julia stewards declare that pyplot shall be the main Julia plotting library?

I think you have misunderstood what the goal of the Julia stewards is. You can read about stewardship here [Julia Community - Stewards](https://julialang.org/community/stewards/). Declaring what is the “main Julia plotting library” is not really one of their tasks ;).

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [November 11, 2022, 12:39am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/25 "2022-11-11T00:39:32Z")

</div>

Like the others I’ve never had issues on this across several linux and windows systems, but these things do occur for some people. The great thing about `Plots` is that it is only a front end with unified syntax for several backends. If you want matplotlib, just add

```julia
using Plots
pyplot()

```

And you can choose the one which works best for you, without having to learn a different syntax for each plotting library. If `Plots` isn’t what you want, `Makie` (split between `CairoMakie` or `GLMakie`) is a good option too, especially if you want high performance plotting.

Also, if you are able/want to use VS code with the Julia extension you have access to the inbuilt plotting pane, which bypasses the need for creating a separate window and might help solve your issues.

---

<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:** [November 11, 2022, 8:08am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/26 "2022-11-11T08:08:37Z")

</div>

May be the “homebrew hacks” (and a changed `DYLD_LIBRARY_PATH`) are the cause of the problems - same for Linux (`LD_LIBRARY_PATH`). You could update `GR.jl` to v0.70.0 and set `GR_DEBUG=1` and then `] test GR` to get more information.

---

<div class="post-metadata">

**Author:** ![Schneeschaufel](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Schneeschaufel](https://discourse.julialang.org/u/Schneeschaufel)\
**Post date:** [November 11, 2022, 8:56am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/27 "2022-11-11T08:56:36Z")

</div>

Hi

Maybe I spend a bit more time the weekend. But as long as pyplot works it is okay.

Nothing to do with OSX homebrew because I am on work Linux (which is heavily guarded for security reasons).

I also don’t think it is conda. I know no one wants to hear it but I installed Julia (on my work Linux) with conda in a virtual environment. I think it works.

What people often forget: Linux its also used in real life which sys admins. But this also means (especially in a heavily guarded environment) it is not easy to install things (e.g. newer Qt) on the fly /usr/bin (except in own /home). On my own Macbook and OSX I can do what I want.

---

<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:** [November 11, 2022, 10:01am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/28 "2022-11-11T10:01:18Z")

</div>

I think people want to hear as much detail as possible about your problem, because that is what can lead this thread to a productive end.

Also, I’m not sure the problem is an old version of Qt or something. As I noticed, I could use it in a server with as OS from 2014 and it worked.

---

<div class="post-metadata">

**Author:** ![Schneeschaufel](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Schneeschaufel](https://discourse.julialang.org/u/Schneeschaufel)\
**Post date:** [November 11, 2022, 10:15am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/29 "2022-11-11T10:15:14Z")

</div>

I cannot do it today.

But what exactly (I need a list written for a dummy step for step) you want me to try out?

Is it possible to create virtual Julia environments (I often have to do it with conda because I screwed up base anaconda installation)?

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [November 11, 2022, 10:30am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/30 "2022-11-11T10:30:51Z")

</div>

The recommended way to use Julia is to use the binaries from the website, not through anaconda. From there, it has it’s own built in package manager, with “environments” (see [4. Working with Environments · Pkg.jl](https://pkgdocs.julialang.org/v1/environments/)), which work a bit differently than conda.

You can use the binaries without the need for installing them with `sudo`, just download to your home directory and unzip the archive. There’s a binary in the `bin` folder which you can run to use julia. I usually add the bin directory to my path so I can just run `julia` without specifying the path. All of this can be done without any special permissions, and it done often on HPC systems where users don’t have admin access.

Also, there’s a tool called `juliaup` ([GitHub - JuliaLang/juliaup: Julia installer and version multiplexer](https://github.com/JuliaLang/juliaup#mac-and-linux)) which will likely work as well, with a one line install:

```nohighlight
curl -fsSL https://install.julialang.org | sh

```

Then you can use the latest release with:

```nohighlight
juliaup default release

```

And you can run just with `julia` from the command line or how you usually use it.

---

<div class="post-metadata">

**Author:** ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Post date:** [November 11, 2022, 10:34am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/31 "2022-11-11T10:34:45Z")

</div>

To try this in a new project, start up Julia in some empty directory, and run this:

```julia
using Pkg
Pkg.activate(@ __DIR__ )
Pkg.add("Plots")
using Plots
gr()
plot(rand(10))

```

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [November 13, 2022, 3:17am UTC](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061/32 "2022-11-13T03:17:01Z")

</div>

Split this topic on November 13, 2022, 3:17am UTC

10 posts were split to a new topic: [Trouble using plots (on macOS)](https://discourse.julialang.org/t/trouble-using-plots-on-macos/90182)

[Previous page](https://discourse.julialang.org/t/trouble-using-plots-on-linux/90061.md?page=1)
