Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualizing magnetization at a particular time-step #156

Closed
DebanjanPolley opened this issue Jun 28, 2021 · 4 comments
Closed

Visualizing magnetization at a particular time-step #156

DebanjanPolley opened this issue Jun 28, 2021 · 4 comments

Comments

@DebanjanPolley
Copy link

Hi,
I am driving a system for 1000 ps with the following code:

T = 1000e-12
N = 1000
system.dynamics = mm.Precession(gamma0=gamma0) + mm.Damping(alpha=alpha)
td = oc.TimeDriver()
td.drive(system, t=T, n=N)

Then I need to plot the z component of magnetization (Mz) of the system and I am doing it in the following way:

import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(20, 5))
system.m.plane('z', n=(20, 20)).mpl_vector(ax=ax)

Now, after the end of the simulation, is there a simple way to visualize Mz at some intermediate time-step: let's say T = 250, 500 and 750 ps?

@DebanjanPolley
Copy link
Author

DebanjanPolley commented Jun 29, 2021

Got it using some help from these two links.

https://github.com/ubermag/workshop/blob/master/tutorials/mpl-visualisation.ipynb

#144

@fangohr
Copy link
Member

fangohr commented Jun 29, 2021

Thank you for providing the links that help answer the question. This is really useful to build up a knowledge data base here, and will help other users as well.

@Milad-spinwave
Copy link

Why I can not open the link you shared about visualization? I mean this : https://github.com/ubermag/workshop/blob/master/tutorials/mpl-visualisation.ipynb
it shows : 404 : page not found. from where I can see the context of this link?

@lang-m
Copy link
Member

lang-m commented Jul 3, 2023

Hi @Milad-spinwave, the documentation has been re-organised a while ago. Please refer to this page for visualisation with matplotlib: https://ubermag.github.io/documentation/notebooks/discretisedfield/field-matplotlib-visualisation.html

There is also a new type of interactive visualisation based on HoloViews, documentation is available here: https://ubermag.github.io/documentation/notebooks/discretisedfield/field-holoviews-visualisation.html (interactivity is not available on the website, only in a running notebook)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants