# \`scatter\` plots and marker colors -- change?

**URL:** https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456
**Category:** Visualization
**Created:** [November 13, 2018, 12:28am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456 "2018-11-13T00:28:49Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [November 13, 2018, 12:28am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/1 "2018-11-13T00:28:49Z")

</div>

I get this strange warning when using `scatter` under Julia v. 1.0.2:

```nohighlight
julia> scatter(rand(10))
'c' argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapp
ing will have precedence in case its length matches with 'x' & 'y'. Please use a 2-D array with a s
ingle row if you really want to specify the same RGB or RGBA value for all points.

```

What is this? I _do_ often want to use the same color for all markers. The same warning pops up if I do:

```nohighlight
julia> scatter(rand(10),rand(10), mc=fill(:red,1,10))

```

What is this? Didn’t I make the marker color dimension equal to the points in the scatter plot? Isn’t that what the warning asks for?

---

<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: [November 13, 2018, 5:58am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/2 "2018-11-13T05:58:21Z")

</div>

That’s not supposed to happen. Do you have some weird defaults set in your startup.jl file? What backend are you using?

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [November 13, 2018, 7:51am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/3 "2018-11-13T07:51:26Z")

</div>

I have no startup.jl file, as far as I know. I use Julia 1.0.2 on two different Windows 10, 64bit (updated) computers. I use PyPlot as backend. In one case, I used a freshly installed Juno on a Windows 10 Home machine; in the other case, I used IJulia on Windows 10 Pro.

On my job desktop: Plots v0.21.0, PyPlot v2.6.3.

I _tried_ to use `GR` as backend on my home computer last night, but there was a problem with `GR`. I just tried with `gr()` backend on my work desktop, and with `gr()` I don’t get this error message. I do get the error message with `pyplot()` backend, though.

Sometimes I also get an error message about to versions of `plots` being installed. On my home computer, I at first had to type `Plots.plot()` to make it work.  
Anyway, perhaps a problem with `PyPlot`?

---

<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: [November 13, 2018, 8:20am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/4 "2018-11-13T08:20:34Z")

</div>

Yes, this is a pyplot issue, I get it with pyplot too

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [November 13, 2018, 8:38am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/5 "2018-11-13T08:38:08Z")

</div>

Good to know. Weird, I just switched my main Julia activity from v. 0.6.4 to 1.0.2, and I haven’t seen that behavior in `pyplot` before.

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [November 13, 2018, 9:22am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/6 "2018-11-13T09:22:45Z")

</div>

OK… so there is an issue with `pyplot` in Julia v1.0.2.

There are also issues with `gr`… `gr` has no support of LaTeX in either `xlabel`, `ylabel`, or `title` – only in `label`.

**UPDATE** : `gr` seems to have problems with `combination` of text and LaTeX math. Asn an example:

```julia
plot!(xlabel=L"time $t$ [s]")

```

fails, where I have used `gr` and `LaTeXString`. Thus, pure math (LaTeX) seems to work in `label`, `xlabel`, `ylabel`, `title`, and pure text seems to work, but not the combination.

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [November 13, 2018, 10:00am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/7 "2018-11-13T10:00:11Z")

</div>

One more bug in `gr`…

```julia
using Plots; gr()
Eig=rand(20,2)
scatter(Eig[:,1],Eig[:,2],shape=:x,ms=5,ma=0.6,mc=:rainbow,mz=1:20,label="")

```

gives _black_ (or: washed-out black?) and very big markers…

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/2/d2901bebe710eef6f2e0cf09992666984bf2e642.jpeg)  
while using the `pyplot` backend gives the expected result:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/9/a90730d50c05b427cd196975e44ab4996dd76cca.png)

With both `gr` and `pyplot`, I get the following strange warning:

```julia
┌ Warning: rainbow is found in more than one library: misc, colorcet. Choosing misc
└ @ PlotUtils C:\Users\<user_name>\.julia\packages\PlotUtils\GxT73\src\color_gradients.jl:40

```

---

<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: [November 13, 2018, 10:09am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/8 "2018-11-13T10:09:14Z")

</div>

If you find bugs it’d be helpful if you open them as issues on Plots.jl. It’s much easier to track than discourse posts

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [November 13, 2018, 11:57am UTC](https://discourse.julialang.org/t/scatter-plots-and-marker-colors-change/17456/9 "2018-11-13T11:57:59Z")

</div>

OK. Will try to do that.
