I am looking to understand how to pass kwargs to scatter plot using PyPlot.
My version control:
(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
[c52e3926] Atom v0.12.30
[e5e0dc1b] Juno v0.8.4
[d330b81b] PyPlot v2.9.0
[295af30f] Revise v3.1.14
[44cfe95a] Pkg
[10745b16] Statistics
This illustrates the error that I am getting:
using PyPlot
pygui(true)
## I want to set the size equal to 50
kwargs=Dict(:s => 50)
## This works fine
figure("Plot_1")
clf()
ax=gca()
ax.scatter(1:10,1:10, s=50)
## This also works
figure("Plot_2")
clf()
ax=gca()
ax.plot(1:10,1:10, kwargs...)
## This does not work, why?
figure("Plot_3")
clf()
ax=gca()
ax.scatter(1:10,1:10, kwargs...)
The error message that I get for Plot_3 above is:
ERROR: LoadError: PyError ($(Expr(:escape, :(ccall(#= /home/josimar/.julia/packages/PyCall/BD546/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'ValueError'>
ValueError('s must be a scalar, or the same size as x and y')
File "/home/josimar/.julia/conda/3/lib/python3.8/site-packages/matplotlib/__init__.py", line 1447, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "/home/josimar/.julia/conda/3/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 411, in wrapper
return func(*inner_args, **inner_kwargs)
File "/home/josimar/.julia/conda/3/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 4448, in scatter
raise ValueError("s must be a scalar, or the same size as x and y")
Let me know if anyone knows how to pass kwargs to scatter plot.