Created
September 30, 2023 18:01
-
-
Save samarlyka/cc3961dbc029baadfdcc1211b5c7c5ee to your computer and use it in GitHub Desktop.
Kode Sumber - Tutorial Visualisasi 2D Data OOMMF Menggunakan Python Matplotlib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| file_masukan = "Permalloy Nanowire 200nm.csv" | |
| data_terbaca = pd.read_csv(file_masukan) | |
| x = data_terbaca["Oxs_TimeDriver::Simulation time"] | |
| y = data_terbaca["Oxs_UniformExchange:NiFe:Energy"] | |
| y2 = data_terbaca["Oxs_Demag::Energy"] | |
| plt.xlabel("Waktu Simulasi") | |
| plt.ylabel("Energi UniformExchange") | |
| plt.plot(x, y, label="Uniform Exchange") | |
| plt.plot(x, y2, label="Demagnetisasi") | |
| plt.title("Plotting/Visualisasi Data OOMMF") | |
| plt.legend() | |
| plt.show() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment