Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_subplot_better(ax):
- ax.figure.subplots_adjust(bottom=0.15, left=0.125, right=0.925, top=0.90, hspace=0.5)
- # set the grid on
- ax.grid('on')
- # add more ticks
- ax.set_xticks(np.arange(25))
- # remove tick marks
- ax.xaxis.set_tick_params(size=0)
- ax.yaxis.set_tick_params(size=0)
- # change the color of the top and right spines to opaque gray
- ax.spines['right'].set_color((.8, .8, .8))
- ax.spines['top'].set_color((.8, .8, .8))
- # tweak the axis labels
- xlab = ax.xaxis.get_label()
- ylab = ax.yaxis.get_label()
- xlab.set_style('italic')
- xlab.set_size(10)
- ylab.set_style('italic')
- ylab.set_size(10)
- # tweak the title
- ttl = ax.title
- ttl.set_weight('bold')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement