`scatter` plots and marker colors -- change?


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

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:

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?


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


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?


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


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.


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

There are also issues with grgr 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:

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.


One more bug in gr

using Plots; gr()

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

while using the pyplot backend gives the expected result:

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

┌ 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


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


OK. Will try to do that.