How do I plot galactic coordinates using matplotlib and astropy in python?
This code reads coordinates as equatorial (ra, dec) and transforms them to galactic (l, b):

eq = SkyCoord(xarr[:], yarr[:], unit=u.deg)
gal = eq.galactic


The contents of 'galacticwperiod.csv' are already in galactic coordinates and should not be transformed.
Something like this may give better results:

gal = SkyCoord(xarr[:], yarr[:], frame='galactic', unit=u.deg)


The other issue is that pyplot's geographic projections seem to expect angles in radians.
This code:

plt.subplot(111, projection='aitoff')
plt.grid(True)
plt.scatter(gal.l.wrap_at('180d').radian, gal.b.radian)


produces this plot: