# Plot not defined

**URL:** <https://discourse.julialang.org/t/plot-not-defined/76482>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [February 15, 2022, 12:11pm UTC](https://discourse.julialang.org/t/plot-not-defined/76482 "2022-02-15T12:11:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sai\_matcha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sai_matcha/32/35801_2.png) [@sai\_matcha](https://discourse.julialang.org/u/sai_matcha)\
**Post date:** [February 15, 2022, 12:11pm UTC](https://discourse.julialang.org/t/plot-not-defined/76482/1 "2022-02-15T12:11:47Z")

</div>

I was using plots previously. suddenly it stopped working.

```julia
julia> using Plots

julia> x = 1:10 ; y = rand(10)
10-element Vector{Float64}:
 0.328078505773031
 0.1228315686010254
 0.18449539206763776
 0.9873483723089912
 ⋮
 0.730594845410921
 0.10355436599035883
 0.9464562835035604
 0.5769754861870682

julia> plot(x,y)
ERROR: UndefVarError: plot not defined
Stacktrace:
 [1] top-level scope
   @ none:1

```

these are the current status of my packeges

```julia
(@v1.7) pkg> st
      Status `~/.julia/environments/v1.7/Project.toml`
  [cbdf2221] AlgebraOfGraphics v0.6.4
  [c52e3926] Atom v0.12.36
  [336ed68f] CSV v0.10.2
  [13f3f980] CairoMakie v0.7.2
  [8be319e6] Chain v0.4.10
  [a93c6f00] DataFrames v1.3.2
  [1313f7d8] DataFramesMeta v0.10.0
  [28b8d3ca] GR v0.63.1
  [c91e804a] Gadfly v1.3.4
  [7073ff75] IJulia v1.23.2
  [e5e0dc1b] Juno v0.8.4
  [bd3c0b08] MissingsAsFalse v0.1.0
  [3beb2ed1] PDFmerger v0.2.0
  [69de0a69] Parsers v2.2.2
  [91a5bcdd] Plots v1.25.9
  [d330b81b] PyPlot v2.10.0
  [1277b4bf] ShiftedArrays v1.0.0
  [f3b207a7] StatsPlots v0.14.33
  [ade2ca70] Dates

```

can some one help to resolve this ? thanks.

---

<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:** [February 15, 2022, 12:32pm UTC](https://discourse.julialang.org/t/plot-not-defined/76482/2 "2022-02-15T12:32:39Z")

</div>

Is this a fresh Julia section? It may happen that two packages you are using export `plot` functions, and then you have to qualify the name (there is a warning message about that):

```julia
julia> using Plots, GR

julia> x = rand(10);

julia> plot(x)
WARNING: both GR and Plots export "plot"; uses of it in module Main must be qualified
ERROR: UndefVarError: plot not defined
Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

julia> plot(x)
ERROR: UndefVarError: plot not defined
Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

julia> Plots.plot(x) # this works

```
