• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Fix color for multiline updating plot matplotlib

Resolved: Fix color for multiline updating plot matplotlib

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have a numpy array with:
  • col[0]=time=xaxis_data
  • col[1:32]= lines for y axis.

Every second a new row of data is added to the array.
I am plotting the data and updating the plots, however I cannot get the colors of each line to stay fixed.

Answer:

I don’t think you can plot different colours in a single line plot statement but if you put in a nested for loop it is then possible:

If you have better answer, please add a comment about this, thank you!

colors matplotlib numpy python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Passing 2 functions in onChange in react

24/03/2023

Resolved: Why doesn’t stringstream consume output during hex formatting?

24/03/2023

Resolved: CMake path for python3 libraries doesn’t change (windows 10)

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.