Matplotlib Plot Dashed Circles (using plt.plot instead of plt.scatter)

后端 未结 1 1610
情歌与酒
情歌与酒 2020-12-06 23:45

Given the following:

import matplotlib.pyplot as plt 
import numpy as np 
#http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.scatter
x = np.random         


        
相关标签:
1条回答
  • 2020-12-07 00:36

    You can use the dotted circle (ur'$\u25CC$') from the STIX font (pdf with all symbols here) using mathtext functionality

     plt.plot(x, y, marker=ur'$\u25CC$', markerfacecolor='r', 
                    markeredgecolor='r', markersize=30, linestyle='none', )
    

    Note, that markerfacecolor is set to a color as well.

    A drawback is that they need a certain size to be distinguishable from a closed circle.

    0 讨论(0)
提交回复
热议问题