There is a set of 100 measurements (for example, the average current from the frequency of the voltage change is not important). And each of these dimensions is different add. by parameter. I want to build a three-dimensional graph as an intensity graph (two-dimensional projection) (X is the frequency, Y is an additional parameter, Z is the average current). Z value should differ in color.

I tried using the matplotlib library, but all the examples that I found have a strict mathematical dependence on [X, Y].

I am waiting for your advice on how to implement this plan. Thank!

Closed due to the fact that the essence of the question is not clear to the participants 0xdb , Xander , mkkik , LFC , freim 20 Mar at 10:03 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

1 answer 1

If I understand the question correctly, you can do this:

import matplotlib.pyplot as plt x = [1,2,3,4,5,6,7,8,9] y = [1,4,2,2,5,1,7,8,5] z = [5,5,2,3,6,7,1,3,3] plt.scatter(x, y, c=z, s=100, cmap='Reds') # c задает цветность, в зависимости от z plt.colorbar() 

enter image description here

  • Thank! Yes, this is exactly what was needed! - Victor
  • @ Victor, to thank the author of the answer, mark it as a solution - MaxU