Closed DebanjanPolley closed 11 months ago
@DebanjanPolley As mpl
is designed to deal with 2D visualisations, mpl.vector
will only plot 2D arrows within the plane rather than three dimensional arrows pointing in the vector direction. Thus is you have a vector (vx, vy, vz)
and plot the z
plane the arrows will point in the (vx, vy)
direction.
If you prefer 3D visualisations, the next release of discretisedfield
will have support for more complex visualizations using pyvista
.
I am simulating a circular dot with out-of-plane magnetization and studying the effect of current pulse-induced magnetization dynamics. Initially, the magnetization is aligned out-of-plane (z direction). I am trying to plot 'Mz' as a scalar field on the surface of a circular region. On top of that, I also would like to plot the magnetization vector as an arrow. I am using the following code:
I can understand the scalar 'Mz' component, as with the colormap I am using, it should show 'red' and 'blue' for two opposite orientations of the magnetization. However, I am confused with the vector component orientation. To my understanding, initially, as the magnetization is mostly out-of-plane, it should show a '.' or 'x' (i.e. the tip or tail of the arrow). However, as you can see in the attached figure, it looks like the magnetization is aligned along 'X' axis. Am I doing something wrong?