I\'m trying to make a plot similar to this excel example:

I would like to know if there i
I am also unable to comment due to reputation but have a minor fix for behzad's answer.
The tick_params() 'bottom' and 'top' keywords take booleans, not strings (at least for py3.6). For example, using bottom = 'off' for me still produces ticks whereas using bottom = False removes ticks.
so replace
ax.tick_params( axis='x', which='major', bottom='off', top='off' )
with
ax.tick_params( axis='x', which='major', bottom=False, top=False )
and it works!