# How to choose a plotting package?

**URL:** <https://discourse.julialang.org/t/how-to-choose-a-plotting-package/1134>\
**Category:** New to Julia\
**Tags:** question, plotting\
**Created:** [December 24, 2016, 10:45am UTC](https://discourse.julialang.org/t/how-to-choose-a-plotting-package/1134 "2016-12-24T10:45:43Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 27, 2016, 5:04pm UTC](https://discourse.julialang.org/t/how-to-choose-a-plotting-package/1134/25 "2016-12-27T17:04:20Z")

</div>

Alright, we’re getting somewhere! Let me explain what’s happening with a script. In Julia, the plotting happens because the `plot()` command returns a plot object. However, there is a difference between running a command in a script, and running a command in the REPL. In the REPL:

```julia
a = 2

```

automatically returns, while

```julia
a = 2;

```

does not (like MATLAB). However, that would make you have to put `;` everywhere in a script, and so

```julia
a = 2

```

does now return `a` in a script. However, this means that `plot(...)` doesn’t actually return anything to show in a script.

So the next thing we should do is make sure it works for you inside of a script. Once again, I’ll use Plotly since it should always be working (if you have a working web browser). Now put

```julia
using Plots; plotly()
display(plot(rand(10,10)))

```

inside of a `.jl` file. Inside of the REPL, do `include("filename.jl")` (use `pwd()` to make sure you’re in the right directory, and `cd("...")` around if you need to). This should display the plot.

Now I am not sure about getting `julia filename.jl` to work directly from the terminal since Julia will exit when finishing its commands. Maybe that’s why it wasn’t working before? I generally just use Julia interactively (and I suspect many others do too).

---

_[View the full topic](https://discourse.julialang.org/t/how-to-choose-a-plotting-package/1134)._
