I am working on some data visualization, and noticed that the python library was quite lacking in cyclic colormaps. After some searching around, I saw that plotly offered some good options! However, I am having trouble implementing it into my code. I have definitely installed it correctly (when I print a list of their swatches it works), but can't actually get it to work on my graph. Here's the code! Any help would be appreciated!
import plotly.express as px
wd = merge_all_jan['Wind Dir (10s deg)']
conc = merge_all_jan['Mean_CO2']
ws = merge_all_jan['Wind Spd (km/h)']
cmap = px.colors.cyclical.mrybm
plt.figure(figsize=(10,7))
plt.scatter(ws, conc, c=wd, s = 20, marker='o', cmap = cmap)
ax = plt.gca()
ax.set_facecolor('white')
cbar = plt.colorbar(pad=0.1)
cbar.set_label('Wind Direction (Deg.)',rotation=270, labelpad = 10)
plt.ylabel("CO₂ (ppm)")
plt.xlabel("Wind Speed (km/h)")
plt.title("Asymptotic CO₂ concentration by wind speed")
I've tried a few different ways of changing the cmap variable but none have worked for me.