Easiest workaround is to replace scatter by plot. This won't offer all functionality of scatter, but for the MWE it is sufficient: linestyle='None', marker='o', markersize=np.sqrt(max_marker_size), ...