how to make hollow square marks with matplotlib in python

后端 未结 2 999
我寻月下人不归
我寻月下人不归 2021-02-05 04:19

Black line in the following graph is plotting using the below command for matplotlib python

pylab.semilogy(xaxis, pq_averages, \'ks-\',color=\'black\', label=\'D         


        
相关标签:
2条回答
  • 2021-02-05 04:30

    Try adding markerfacecolor like so:

    pylab.semilogy(xaxis, pq_averages, 'ks-', markerfacecolor='none', label='DCTCP-PQ47.5')
    
    0 讨论(0)
  • 2021-02-05 04:36

    Setting markerfacecolor='white' does not actually make them hollow, it makes them white. In order to make them hollow, you need to set markerfacecolor='none'. Additionally, you need to set markeredgecolor to the color you want. So:

    pylab.semilogy(xaxis, pq_averages, 'ks-',color='black',
           label='DCTCP-PQ47.5', markerfacecolor='none', markeredgecolor='black')
    

    Will do the job for you.

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