Ich bin neu in der Programmierung und ich habe eine Frage, die mich gebeten, eine Konnektivität Plot von Punkt aus den 2 Listen gegeben. Meine Logik war eine einzige konstant zu halten koordinieren, während die andere in einer for-Schleife Plotten aber nicht funktioniert hat ... bitte helfenConnectivity Plot von Punkten
from matplotlib import pyplot as plt
import numpy as np
def Question_3():
x = [0, 0.7, 1, 0.7, 0, -0.7, -1, -0.7]
y = [1, 0.7, 0, -0.7, -1, -0.7, 0, 0.7]
plt.subplot(121)
plt.title("Scatter plot of points", fontsize = 16)
plt.plot(x, y, ".k")
plt.show()
plt.subplot(122)
plt.title("Connectivity plot of points", fontsize = 16)
for C1 in zip(x, y):
for C2 in zip(x, y):
plt.plot(C1, C2, "-r")
plt.show()
Question_3()
Dank !! Ich habe das versucht, aber ich habe 'plt.plot ((x0, y0), (x1, y1)," -r ")'. –