# Error in ploting

**URL:** <https://discourse.julialang.org/t/error-in-ploting/45137>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [August 18, 2020, 1:28am UTC](https://discourse.julialang.org/t/error-in-ploting/45137 "2020-08-18T01:28:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 18, 2020, 1:28am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/1 "2020-08-18T01:28:44Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/9/1/9163f9d5c8eebb1a704820896ea4844813d20e5e.png)

---

<div class="post-metadata">

**Author:** ![mbaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbaz/32/17295_2.png) [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Post date:** [August 18, 2020, 12:51pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/2 "2020-08-18T12:51:34Z")

</div>

Please see: [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757)

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 18, 2020, 1:24pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/3 "2020-08-18T13:24:01Z")

</div>

![Screenshot 2020-08-18 at 15.23.47](https://global.discourse-cdn.com/julialang/original/3X/5/f/5f35d6511619a9365daf5a8c1b1acf0e0b21bf8b.png)

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 18, 2020, 2:58pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/4 "2020-08-18T14:58:12Z")

</div>

```julia
Plots

using Pkg
Pkg.add("Plots")
using Plots

x = -6:0.2:9 
f(x) = x^3
y = f.(x)

gr()

plot(x,y, label="line")

```

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 18, 2020, 3:01pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/5 "2020-08-18T15:01:12Z")

</div>

This is the error

```julia
type or paste code hMethodError: no method matching get_color_palette(::Symbol, ::RGBA{Float64}, ::Int64)
Closest candidates are:
  get_color_palette(::Any, ::Any) at C:\Users\Nithin\.julia\packages\PlotUtils\nCtbM\src\colorschemes.jl:328
  get_color_palette(!Matched::ColorGradient, ::Any) at C:\Users\Nithin\.julia\packages\PlotUtils\nCtbM\src\colorschemes.jl:329

Stacktrace:
 [1] _update_subplot_colors(::Plots.Subplot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\WwFyB\src\args.jl:1436
 [2] _update_subplot_args(::Plots.Plot{Plots.GRBackend}, ::Plots.Subplot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Int64, ::Bool) at C:\Users\Nithin\.julia\packages\Plots\WwFyB\src\args.jl:1523
 [3] _subplot_setup(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Array{Dict{Symbol,Any},1}) at C:\Users\Nithin\.julia\packages\Plots\WwFyB\src\pipeline.jl:297
 [4] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Int64,1},Array{Int64,1}}) at C:\Users\Nithin\.julia\packages\Plots\WwFyB\src\plot.jl:206
 [5] plot(::Array{Int64,1}, ::Vararg{Array{Int64,1},N} where N; kw::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:label,),Tuple{String}}}) at C:\Users\Nithin\.julia\packages\Plots\WwFyB\src\plot.jl:57
 [6] top-level scope at In[25]:1
 [7] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091ere

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [August 19, 2020, 6:32am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/6 "2020-08-19T06:32:10Z")

</div>

What’s the output of `versioninfo() ` and `Pkg.status()`?

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 8:24am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/7 "2020-08-19T08:24:55Z")

</div>

I tried your code under Julia 1.5.0 (got that from your screenshot) but it works.

If you really only did `Pkg.add("Plots")`, you should have obtained the correct versions. To me the error looks like some API incompatibilities, but not sure how you got into that state. I assume you have not pinned or manually installed other versions of `Plots` dependencies 😉

…let’s wait for your `Pkg.status()`.

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 8:45am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/8 "2020-08-19T08:45:15Z")

</div>

> [@nilshg](#):
>
> versioninfo()  
> Julia Version 1.5.0  
> Commit 96786e22cc (2020-08-01 23:44 UTC)  
> Platform Info:  
> OS: Windows (x86\_64-w64-mingw32)  
> CPU: Intel(R) Core™ i5-8250U CPU @ 1.60GHz  
> WORD\_SIZE: 64  
> LIBM: libopenlibm  
> LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

```julia
[c52e3926] Atom v0.12.19
  [336ed68f] CSV v0.7.7
  [a93c6f00] DataFrames v0.21.6
  [9d24351c] Dolo v0.4.0
  [4d6a76a9] Econometrics v0.2.7
  [9d5cd8c9] FixedEffectModels v0.10.9
  [4d2f22df] GARCH v0.3.1
  [38e38edf] GLM v1.3.10
  [7073ff75] IJulia v1.21.2
  [e5e0dc1b] Juno v0.8.3
  [f0f68f2c] PlotlyJS v0.13.1
  [91a5bcdd] Plots v0.27.1
  [fcd29c91] QuantEcon v0.16.2
  [d519eb52] RegressionTables v0.4.0
  [a110ec8f] Temporal v0.7.0
  [9e3dc215] TimeSeries v0.18.0
  [fdbf4ff8] XLSX v0.7.3
  [8bb1440f] DelimitedFiles

```

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 9:17am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/9 "2020-08-19T09:17:18Z")

</div>

You have a very old `Plots` version (0.27.1), the latest version is 1.6.0. The problem is that the dependencies do not play well together.

Just do a `Pkg.update("Plots")` and it should be fixed.

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 11:24am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/10 "2020-08-19T11:24:38Z")

</div>

It still doesnt help

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 11:26am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/11 "2020-08-19T11:26:38Z")

</div>

You make it really hard to help you.

What do you mean with “it doesn’t help”? Same error? What’s the output of `Pkg.update("Plots")`? Did the update work? What does `Pkg.status()` print now?

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 11:35am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/12 "2020-08-19T11:35:09Z")

</div>

yes update did work… but plot doesn’t appear… the plots version 0.29.9

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 11:37am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/13 "2020-08-19T11:37:49Z")

</div>

The update obviously failed to update `Plots.jl` to the latest version, instead it updated it to `0.29.9` which is still old and having problems with the dependencies.

What is you `Pkg.status()` output now? Some package is probably preventing `Plots.jl` to be updated to the latest version.

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 11:44am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/14 "2020-08-19T11:44:46Z")

</div>

![jul.jpg](https://global.discourse-cdn.com/julialang/original/3X/d/b/db8646dc2ae9bae1ac86ddfbf2bde31dee94e625.jpeg)

This is the status. Thanks

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 11:45am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/15 "2020-08-19T11:45:18Z")

</div>

I recreated your environment and called explicitly `]add Plots@1.6.0`, this is what I get:

```julia
(error_in_plotting) pkg> add Plots@1.6.0
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package RecipesBase [3cdcf5f2]:
 RecipesBase [3cdcf5f2] log:
 ├─possible versions are: [0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 1.0.0-1.0.2] or uninstalled
 ├─restricted by compatibility requirements with TimeSeries [9e3dc215] to versions: [0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 1.0.0-1.0.2]
 │ └─TimeSeries [9e3dc215] log:
 │ ├─possible versions are: [0.13.0, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.1] or uninstalled
 │ └─restricted to versions * by error_in_plotting [b33bbcc9], leaving only versions [0.13.0, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.1]
 │ └─error_in_plotting [b33bbcc9] log:
 │ ├─possible versions are: 0.1.0 or uninstalled
 │ └─error_in_plotting [b33bbcc9] is fixed to version 0.1.0
 ├─restricted by compatibility requirements with Temporal [a110ec8f] to versions: [0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0]
 │ └─Temporal [a110ec8f] log:
 │ ├─possible versions are: [0.5.0-0.5.7, 0.6.0-0.6.1, 0.7.0] or uninstalled
 │ └─restricted to versions * by error_in_plotting [b33bbcc9], leaving only versions [0.5.0-0.5.7, 0.6.0-0.6.1, 0.7.0]
 │ └─error_in_plotting [b33bbcc9] log: see above
 └─restricted by compatibility requirements with Plots [91a5bcdd] to versions: 1.0.0-1.0.2 — no versions left
   └─Plots [91a5bcdd] log:
     ├─possible versions are: [0.12.1-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.6, 0.21.0, 0.22.0-0.22.5, 0.23.0-0.23.2, 0.24.0, 0.25.0-0.25.3, 0.26.0-0.26.3, 0.27.0-0.27.1, 0.28.0-0.28.4, 0.29.0-0.29.9, 1.0.0-1.0.14, 1.1.0-1.1.4, 1.2.0-1.2.6, 1.3.0-1.3.7, 1.4.0-1.4.4, 1.5.0-1.5.9, 1.6.0] or uninstalled
     ├─restricted to versions * by error_in_plotting [b33bbcc9], leaving only versions [0.12.1-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.6, 0.21.0, 0.22.0-0.22.5, 0.23.0-0.23.2, 0.24.0, 0.25.0-0.25.3, 0.26.0-0.26.3, 0.27.0-0.27.1, 0.28.0-0.28.4, 0.29.0-0.29.9, 1.0.0-1.0.14, 1.1.0-1.1.4, 1.2.0-1.2.6, 1.3.0-1.3.7, 1.4.0-1.4.4, 1.5.0-1.5.9, 1.6.0]
     │ └─error_in_plotting [b33bbcc9] log: see above
     └─restricted to versions 1.6.0 by an explicit requirement, leaving only versions 1.6.0

```

`TimeSeries` and `Temporal` are preventing `Plots.jl` to be updated.

You can remove them with `Pkg.rm("TimeSeries")` and `Pkg.rm("Temporal")`.

Afterwards `Pkg.update("Plots")` should update it to 1.6.0.

Are you relying on those two packages?

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 11:52am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/16 "2020-08-19T11:52:40Z")

</div>

I dont use them at present as I am still using R for Timeseries. but What if i want to use it in a later period when I fully learn Julia?

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 11:59am UTC](https://discourse.julialang.org/t/error-in-ploting/45137/17 "2020-08-19T11:59:13Z")

</div>

`TimeSeries.jl` seems to work when you add it after upgrading `Plots.jl`. It’s `Temporal.jl` which is causing the actual dependency problem.

You can inspect the `Project.toml` of a Julia package to see the dependencies. In case of `Temporal.jl` you can see that it only supports `RecipeBase` v0.7 [https://github.com/dysonance/Temporal.jl/blob/8ee2dd7e1a8cb75b824344017c7ca87e48d310c7/Project.toml#L20](https://github.com/dysonance/Temporal.jl/blob/8ee2dd7e1a8cb75b824344017c7ca87e48d310c7/Project.toml#L20) whereas `Plots.jl` is requiring `RecipesBase` v1 as seen here [https://github.com/JuliaPlots/Plots.jl/blob/d6bebe1ce2d16ed7325e4d8bbd907802a32a8f0f/Project.toml#L47](https://github.com/JuliaPlots/Plots.jl/blob/d6bebe1ce2d16ed7325e4d8bbd907802a32a8f0f/Project.toml#L47)

> What if i want to use it in a later period when I fully learn Julia?

Just open an issue at the package which prevents the updates and ask for support.

Alternatively, feel free to do it yourself and open a pull request on the package’s repository 😉 The authors will thank you.

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 12:33pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/18 "2020-08-19T12:33:03Z")

</div>

I know I am troubling you. But I have no clues how to fix this.  
This is the error when i run the command  
plot(x,y, label=“line”)

```julia
could not load library "libGR.dll"
The specified module could not be found. 

Stacktrace:
 [1] setcharheight(::Float64) at C:\Users\Nithin\.julia\packages\GR\8mv9N\src\GR.jl:1395
 [2] gr_set_font(::Plots.Font, ::Plots.Subplot{Plots.GRBackend}; halign::Symbol, valign::Symbol, color::RGB{FixedPointNumbers.Normed{UInt8,8}}, rotation::Int64) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\backends\gr.jl:386
 [3] gr_set_xticks_font(::Plots.Subplot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\backends\gr.jl:688
 [4] _update_min_padding!(::Plots.Subplot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\backends\gr.jl:900
 [5] iterate at .\generator.jl:47 [inlined]
 [6] _collect(::Array{AbstractLayout,2}, ::Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}, ::Base.EltypeUnknown, ::Base.HasShape{2}) at .\array.jl:699
 [7] collect_similar(::Array{AbstractLayout,2}, ::Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}) at .\array.jl:628
 [8] map(::Function, ::Array{AbstractLayout,2}) at .\abstractarray.jl:2162
 [9] _update_min_padding!(::Plots.GridLayout) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\layouts.jl:310
 [10] prepare_output(::Plots.Plot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\plot.jl:184
 [11] show(::Base.GenericIOBuffer{Array{UInt8,1}}, ::MIME{Symbol("image/svg+xml")}, ::Plots.Plot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\output.jl:214
 [12] sprint(::Function, ::MIME{Symbol("image/svg+xml")}, ::Vararg{Any,N} where N; context::Nothing, sizehint::Int64) at .\strings\io.jl:105
 [13] sprint at .\strings\io.jl:101 [inlined]
 [14] _ijulia_display_dict(::Plots.Plot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\ijulia.jl:53
 [15] display_dict(::Plots.Plot{Plots.GRBackend}) at C:\Users\Nithin\.julia\packages\Plots\6RLiv\src\init.jl:73
 [16] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [17] invokelatest at .\essentials.jl:709 [inlined]
 [18] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\Nithin\.julia\packages\IJulia\tOM8L\src\execute_request.jl:112
 [19] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [20] invokelatest at .\essentials.jl:709 [inlined]
 [21] eventloop(::ZMQ.Socket) at C:\Users\Nithin\.julia\packages\IJulia\tOM8L\src\eventloop.jl:8
 [22] (::IJulia.var"#15#18")() at .\task.jl:356

```

In :

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [August 19, 2020, 12:41pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/19 "2020-08-19T12:41:39Z")

</div>

No worries, you are not troubling me, just provide all necessary information so that everybody out there can understand your situation 😉

This means that you don’t have GR installed, which is the back-end you have chosen to plot. Try `Pkg.add("GR")`. You can also choose different back-ends, like `plotly()` or `plotlyjs()` since I see that you have that installed, or `pyplot()` (after `Pkg.add("PyPlot")`).

I have no experience with Julia on Windows, but as far as I know, GR should work fine…

---

<div class="post-metadata">

**Author:** ![Nithin\_M](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nithin_m/32/16811_2.png) [@Nithin\_M](https://discourse.julialang.org/u/Nithin_M)\
**Post date:** [August 19, 2020, 1:10pm UTC](https://discourse.julialang.org/t/error-in-ploting/45137/20 "2020-08-19T13:10:24Z")

</div>

There is no way Plot is working. so what would be the command to plot fir i use plotly?

[Next page](https://discourse.julialang.org/t/error-in-ploting/45137.md?page=2)
