Figure 2: Phase diagrams

This notebook reproduces the two phase diagrams in figure 2i and 2ii (with and without demagnetisation included in the simulations).

They show the state type which occurred throughout the hysteresis for all thicknesses simulated.

The colours correspond to the following state types, as defined in the paper:

  • dark purple: incomplete skyrmion (core down)
  • olive: transition state (no radial symmetry)
  • light green: skyrmion (core up)
  • white: target state
  • light purple: skyrmion (core down)
  • dark green: incomplete skyrmion (core up)

In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import from_levels_and_colors

In [2]:
dark_purple = '#8464c5'
light_purple = '#ededfb'
dark_green = '#336433'
light_green = '#a0d9a0'
white = '#FFFFFF'
olive = '#aaa460'

In [3]:
thicknesses_x = np.array([10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90]) - 2.5
Hvalues = np.linspace(-4, 4, 401)
x, y = np.meshgrid(thicknesses_x, Hvalues)

In [4]:
state_types = np.load('../data/figure_2/phase_diagram_state_types_demag.npy')

In [5]:
plt.figure(figsize=(10, 8))

bounds = [0, 1, 2, 3, 4, 5, 6]
cm = [dark_purple, olive, light_green, white, light_purple, dark_green]
cmap, norm = from_levels_and_colors(bounds, cm)

plot = plt.pcolor(x, y, state_types, cmap=cmap, norm=norm, rasterized=True)
plt.xlabel("thickness (nm)", fontsize=20)
plt.ylabel(r'H ($\times$M$_{\mathrm{s}}$)', fontsize=20)
plt.tick_params(labelsize=16)

plt.text(80, -0.73, '(b)', fontsize=20)
plt.annotate('(d)', xy=(52, 0.25), xytext=(57, -0.25),
            arrowprops=dict(facecolor='black', shrink=0.05, width=0.5, headwidth=6, frac=0.3),
            fontsize=20)
plt.annotate('(h)', xy=(40, 0.25), xytext=(30, -0.21),
            arrowprops=dict(facecolor='black', shrink=0.05, width=0.5, headwidth=6, frac=0.3),
            fontsize=20)

cbar = plt.colorbar(plot)
cbar.set_ticks([0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5])
cbar.set_ticklabels(['', '', '', '', '', ''])
cbar.ax.tick_params(labelsize=14)

plt.axis([x.min(), x.max(), y.min(), y.max()])

plt.savefig('pdfs/figure-2i.pdf')

plt.show()


/usr/local/lib/python2.7/dist-packages/matplotlib/text.py:2158: UserWarning: 'frac' option in 'arrowstyle' is no longer supported; use 'headlength' to set the head length in points.
  "'frac' option in 'arrowstyle' is no longer supported;"

In [6]:
thicknesses_x = np.array([10, 20, 30, 40, 45, 50, 60, 70, 80, 90]) - 2.5
Hvalues = np.linspace(-4, 4, 401)
x, y = np.meshgrid(thicknesses_x, Hvalues)

In [7]:
state_types_nd = np.load('../data/figure_2/phase_diagram_state_types_no_demag.npy')

In [8]:
plt.figure(figsize=(10, 8))

bounds = [0, 1, 2, 3, 4, 5, 6]
cm = [dark_purple, olive, light_green, white, light_purple, dark_green]
cmap, norm = from_levels_and_colors(bounds, cm)

plot = plt.pcolor(x, y, state_types_nd, cmap=cmap, norm=norm, rasterized=True)
plt.xlabel("thickness (nm)", fontsize=20)
plt.ylabel(r'H ($\times$M$_{\mathrm{s}}$)', fontsize=20)
plt.tick_params(labelsize=16)

cbar = plt.colorbar(plot)
cbar.set_ticks([0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5])
cbar.set_ticklabels(['', '', '', '', '', ''])
cbar.ax.tick_params(labelsize=14)

plt.axis([x.min(), x.max(), y.min(), y.max()])

plt.savefig('pdfs/figure-2ii.pdf')

plt.show()



In [ ]: