Turn off the upper/right axis tick marks

前端 未结 4 1459
天涯浪人
天涯浪人 2020-12-17 11:16

I want to make the ticks on the right and upper axis invisible and am not sure what the third line should be:

import matplotlib.pyplot as plt
plt.plot(X,Y)
#         


        
4条回答
  •  北海茫月
    2020-12-17 11:44

    plt.tick_params(top='off', right='off', which='both') 
    

    I used above code with 'on' instead of 'off' ,for displaying tick marks on top and right along with default 'bottom'and 'left', in matplotlib 2.0

提交回复
热议问题