When Python draws a line chart, using scatter, the use of parameter C = ” will cause warning:
ax.scatter(x_value,y_value,c=(0,0.2,0),s=10)
‘c’ argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with ‘x’ & ‘y’. Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.
It may be a problem with the version of matplotlib, higher versions no longer report a warning.
You can change the original statement to the following one.
ax.scatter(x_value,y_value,color=(0,0.2,0),s=10)
Or let the log display only errors of error level:
from matplotlib.axes._axes import _log as matplotlib_axes_logger
matplotlib_axes_logger.setLevel('ERROR')
Hope to help you through sharing, thank you.
Read More:
- [Solved] Python Error: positional argument follows keyword argument
- [Solved] Python Error: TypeError: write() argument must be str, not bytes
- [Solved] Pytroch warning: “Argument interpolation should be of type InterpolationMode instead of int. “
- RuntimeError: Non RGB images are not supported [How to Fix]
- import statsmodels.api as sm Error: ImportError: DLL load failed while importing _arpack: The specified program could not be found.
- Tensor for argument #2 ‘mat1‘ is on CPU, but expected it to be on GPU (while checking arguments for
- [Solved] wsgiref make_server Error: AssertionError: write() argument must be a bytes instance
- cffi Security Report “c / _cffi_backend.oc / _cffi_backend.c: 15:17: error: ffi.h: No such file or directory” Problem
- import matplotlib.pyplot as plt [How to Solve]
- [Solved] Jupyter notebook: TypeError: __init__() got an unexpected keyword argument ‘io_loop’
- ConfigParser.InterpolationSyntaxError: ‘%‘ must be followed by ‘%‘ or ‘(‘, found: “%&‘“
- PIP Install Mysqlclient error C1083: Cannot open include file: ‘mysql.h‘: No such file or directory
- [Solved] python-sutime Error: the JSON object must be str, bytes or bytearray, not ‘java.lang.String‘
- Pandas Error: ValueError: setting an array element with a sequence.
- [How to Fix]RuntimeError: Python is not installed as a framework, If you are using (Ana)Conda
- [Solved] TypeError: __init__() missing 1 required positional argument: ‘on_delete’
- Python Error: _csv.Error sequence expected
- [Solved] error: OpenCV(4.5.2) :-1: error: (-5:Bad argument) in function ‘copyMakeBorder‘
- Solution warning: userwarning: fixedformatter should only be used together with fixedlocator (illustrated version)!)
- [Solved] PyTorch Caught RuntimeError in DataLoader worker process 0和invalid argument 0: Sizes of tensors mus