Using seaborn and matplotlib I was able to make a bar graph for a homework assignment, and want to know how I could reduce the amount of times the x/y axis information appears. As in, instead of appearing all the years from 1989 to 2014, for example, it only appears every 4 years or so.
Here's my graph:
and what my homework assignment asks me to do:
here's my code:
import matplotlib.pyplot as plt
import seaborn as sns
planets = sns.load_dataset("planets")
sns.set_style("whitegrid")
g = sns.catplot(x='year', kind='count', data=planets, aspect=2, palette="Blues")
g = g.set_axis_labels("year",'count').set(xlim=(0,25), ylim=(0,200))
plt.show(g)