Skip to content

Instantly share code, notes, and snippets.

@samarlyka
Created September 30, 2023 18:01
Show Gist options
  • Select an option

  • Save samarlyka/cc3961dbc029baadfdcc1211b5c7c5ee to your computer and use it in GitHub Desktop.

Select an option

Save samarlyka/cc3961dbc029baadfdcc1211b5c7c5ee to your computer and use it in GitHub Desktop.
Kode Sumber - Tutorial Visualisasi 2D Data OOMMF Menggunakan Python Matplotlib
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