from matplotlib import pyplot as plt
from matplotlib.ticker import MultipleLocator
import numpy as np
from ligo.skymap.plot.marker import moon

d_phase = 30
phases = np.arange(-180, 180 + d_phase, d_phase)

fig, ax = plt.subplots(figsize=(8, 3), tight_layout=True)
ax.xaxis.set_major_locator(MultipleLocator(d_phase))
for phase in phases:
    ax.plot(phase, 4, ms=20, marker=moon(phase, shadow=False), mfc="none", mec="black")
    ax.plot(phase, 3, ms=20, marker=moon(phase, shadow=False), mfc="goldenrod", mec="none")
    ax.plot(phase, 2, ms=20, marker=moon(phase, shadow=False), mfc="goldenrod", mec="k")
    ax.plot(phase, 1, ms=20, marker=moon(phase, shadow=True), mfc="goldenrod", mfcalt="gray", mec="none")
    ax.plot(phase, 0, ms=20, marker=moon(phase, shadow=True), mfc="goldenrod", mfcalt="gray", mec="black")
ax.set_yticks(
    [0, 1, 2, 3, 4],
    ["shadow, fill, stroke", "shadow, fill", "fill, stroke", "fill", "stroke"],
)
ax.set_ylim(-0.5, 4.5)