# Scatter plot

**URL:** <https://discourse.julialang.org/t/scatter-plot/37987>\
**Category:** Visualization\
**Created:** [April 21, 2020, 7:07pm UTC](https://discourse.julialang.org/t/scatter-plot/37987 "2020-04-21T19:07:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmandaPS22](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@AmandaPS22](https://discourse.julialang.org/u/AmandaPS22)\
**Post date:** [April 21, 2020, 7:07pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/1 "2020-04-21T19:07:25Z")

</div>

Hi, I’m new to the JULIA language and I’m having trouble plotting a scatter plot.  
The command entered was:

> using PyPlot  
> scatter(X.d, X.b, facecolor = “none”, edgecolors=“orange”, s=20, label=“xxx”)

Then an error message appears:

**WARNING: both StatsPlots and PyPlot export “scatter”; uses of it in module Main must be qualified**  
**ERROR: UndefVarError: scatter not defined**

Anybody help me?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [April 21, 2020, 7:12pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/2 "2020-04-21T19:12:14Z")

</div>

`PyPlot.scatter(...`?

---

<div class="post-metadata">

**Author:** ![AmandaPS22](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@AmandaPS22](https://discourse.julialang.org/u/AmandaPS22)\
**Post date:** [April 21, 2020, 7:17pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/3 "2020-04-21T19:17:10Z")

</div>

No, same error message.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [April 21, 2020, 7:18pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/4 "2020-04-21T19:18:43Z")

</div>

You should not be `using StatsPlots` and `using PyPlot` at the same time. Try restarting your REPL session and

```julia
using StatsPlots
pyplot()

```

---

<div class="post-metadata">

**Author:** ![AmandaPS22](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@AmandaPS22](https://discourse.julialang.org/u/AmandaPS22)\
**Post date:** [April 21, 2020, 7:48pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/5 "2020-04-21T19:48:37Z")

</div>

Now the following error message appears:  
(using: scatter(X.d, X.b, facecolor = “none”, edgecolors=“orange”, s=20, label=“xxx”))

ERROR: Unknown key: edgecolors

When i use: PyPlot.scatter(X.d, X.b, facecolor = “none”, edgecolors=“orange”, s=20, label=“xxx”)

The message that appears is: PyObject \<matplotlib.collections.PathCollection object at 0x0000000053BDD288\>

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [April 21, 2020, 8:16pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/6 "2020-04-21T20:16:18Z")

</div>

Gnuplot?

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [April 21, 2020, 9:08pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/7 "2020-04-21T21:08:17Z")

</div>

Second one sounds like it worked then, even though it didn’t display. I think you should consult the docs

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [April 21, 2020, 9:58pm UTC](https://discourse.julialang.org/t/scatter-plot/37987/8 "2020-04-21T21:58:27Z")

</div>

You should not use StatsPlots if you want to use the PyPlot syntax. Try your code from the OP in a fresh REPL.

---

<div class="post-metadata">

**Author:** ![AmandaPS22](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@AmandaPS22](https://discourse.julialang.org/u/AmandaPS22)\
**Post date:** [April 23, 2020, 12:00am UTC](https://discourse.julialang.org/t/scatter-plot/37987/9 "2020-04-23T00:00:08Z")

</div>

Ok, I will review the code.  
Thanks.

---

<div class="post-metadata">

**Author:** ![AmandaPS22](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@AmandaPS22](https://discourse.julialang.org/u/AmandaPS22)\
**Post date:** [April 23, 2020, 12:00am UTC](https://discourse.julialang.org/t/scatter-plot/37987/10 "2020-04-23T00:00:41Z")

</div>

Thanks.
