meine Excel-Datei wird als CSV gespeichert. Es hat drei Spalten und ich versuche, Spalte 1 vs Spalte 2 und Spalte 1 vs Spalte 3 auf dem gleichen Diagramm plotten. Ich bin in der Lage, die drei Spalten in einzelne Variablen zu trennen, aber aus irgendeinem Grund kann es nicht plotten. Nur die X- und Y-Achse wird angezeigt, aber kein tatsächlicher Graph. Weißt du, wie man es plant?Python Plot Daten von Excel CSV-Datei
import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_csv('file:///C:/Users/Avalanche/Documents/data/FL20data/FL20BU%2317.H-Transfer.1 cycle_data.csv', skiprows = 1)
Htran = data.head(1201)
colm1 = Htran.loc[: , "H-Transfer.1 cycle.Field (Oe)"]
colm2 = Htran.loc[: , "H-Transfer.1 cycle.F1"]
colm3 = Htran.loc[: , "H-Transfer.1 cycle.R1"]
plt.plot([colm1], [colm2])
plt.plot([colm1], [colm3])
plt.xlim(-3500,3500)
plt.ylim(2400,2600)
plt.title('R vs. H')
plt.xlabel('H (Oe)')
plt.ylabel('Resistance')
plt.show()
DATA: (ich sicher, dass die erste Zeile in meinem Code überspringen)
(1-5)R6C10 FL20BU-17 Failed: NONE Passed: skipgrade;
H-Transfer.1 cycle.Field (Oe) H-Transfer.1 cycle.F1 H-Transfer.1 cycle.R1
-3000.3 2487.508 2487.508
-2994.7 2492.037 2487.508
-2989.9 2510.315 2496.582
-2985.1 2478.497 2505.721
-2980.3 2478.497 2496.582
-2974.7 2496.582 2514.925
-2969.9 2474.016 2524.195
-2965.2 2496.582 2482.995
-2960.4 2501.143 2487.508
-2954.8 2501.143 2478.497
-2950 2501.143 2505.721
Was ist Ihre aktuelle Ausgabe? leer oder einfach nicht die richtige Grafik? – MattR
Es ist nur ein leeres Diagramm – nrav999