Skip to content Skip to sidebar Skip to footer

Aplpy Show Markers Normalized By A Colormap

I am using APLpy to plot a fits file and want to overplot markers on that fits file at certain ra,dec values. I want the colours of the markers to be coded with another parameter,

Solution 1:

The issue is that matplotlib's scatter can't take values for edgecolor and facecolor that are not color arrays (that is, arrays of RGB values). The correct way to achieve what you are trying to do is to use scatter's c argument, so in this case:

fits1.show_markers(ra,dec, cmap=cmap1, norm=norm1,
                   c=magnitude, facecolor='none',
                   marker='x', s=4, linewidths=0.8)

Post a Comment for "Aplpy Show Markers Normalized By A Colormap"