Search code examples
pythonseabornaxes

How to increase yaxis on seaborn stripplot


I am trying to increase the number of y-ticks for a stripplot.

My code is:

g = sns.stripplot(data=flightdelays,x="delay", y="schedtime", jitter=True, size=10)

I understand that I cannot alter the y-axis using the available commands within stripplot.

The y-axis is the scheduled time in 24-hour form. Is someone able to show me how to set the yticks to every 100 i.e. every hour?


Solution

  • The seaborn plot returns an instance of a matplotlib axes object, which means that any matplotlib axes function can be called. So the solution here is:

    g.set_ylim([min,max])