MatplotlibDeprecationWarning:axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.

Asked by weijie on 2020-05-06

Dear all,

When I plot the chart of unbalancedForce and kineticEn, the program shows the following warning:

/usr/lib/python3/dist-packages/matplotlib/__init__.py:831: MatplotlibDeprecationWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
  mplDeprecation)
/usr/lib/python3/dist-packages/matplotlib/__init__.py:801: MatplotlibDeprecationWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
  mplDeprecation)

What is the impact of this problem and how to solve it?

Thanks in advance.
Jie

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
2020-05-08
Last query:
2020-05-08
Last reply:
2020-05-07
Best Jérôme Duriez (jduriez) said : #1

Hi,

From a user point of view, I think we can say the impact is null / limited to the output of those lines in your YADE terminal. And thus, there is nothing to solve.

From a developer point of view, if you would like to save these outputs for yourself and all other YADE users you could try to look into source code (of plot.plot() command) to see which part uses a deprecated matplotlib attribute, and replaces it.

A true MWE to illustrate the issue:

from yade import plot
plot.addData(x=0,y=0)
plot.plots = {'x':'y'}
plot.plot()

weijie (amandajoe) said : #2

Thanks Jérôme Duriez, that solved my question.