I am trying to create a plot but I just want the ticklabels to show as shown where the log scale is shown as above. I only want the minor ticklabel for 50, 500 and 2000 to s
Based on the answer from @Paul I created the following function:
def get_formatter_function(allowed_values, datatype='float'):
"""returns a function, which only allows allowed_values as axis tick labels"""
def hide_others(value, pos):
if value in allowed_values:
if datatype == 'float':
return value
elif datatype == 'int':
return int(value)
return ''
return hide_others
Which is a bit more flexible.