import numpy as np
from matplotlib import pyplot as plt

from pylinac.core.profile import FWXMProfile

y = np.array([0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0], dtype=float)
x = np.array([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], dtype=float)

prof = FWXMProfile(values=y, x_values=x)
prof_interp = prof.as_resampled(interpolation_factor=3)  # not 2
ax = prof.plot(show=False, show_field_edges=False, show_center=False)
prof_interp.plot(show=True, axis=ax, show_field_edges=False, show_center=False)