Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- matplotlib.rcParams.update({'font.size': 12})
- fig = matplotlib.pyplot.figure(figsize=(5,5),dpi=300,facecolor='black')
- fig.subplots_adjust(wspace=.05,left=.01,bottom=.01)
- ax = fig.add_subplot(1,1,1,axisbg='k')
- ax.spines['top'].set_visible(False)
- ax.spines['right'].set_visible(False)
- ax.spines['bottom'].set_linewidth(0.5)
- ax.spines['left'].set_linewidth(0.5)
- ax.spines['bottom'].set_color('white')
- ax.spines['left'].set_color('white')
- ax.title.set_color('white')
- ax.yaxis.label.set_color('white')
- ax.xaxis.label.set_color('white')
- ax.tick_params(axis='x', colors='white')
- ax.tick_params(axis='y', colors='white')
- ax.tick_params(axis='both', direction='in')
- ax.get_xaxis().tick_bottom()
- ax.get_yaxis().tick_left()
- ax.set_xlabel('X-Axis Label Here')
- ax.set_ylabel('Y-Axis Label Here')
- ax.set_title('Title Here')
- ax.plot(range(10),range(10),'.-',color='yellow', linewidth=2, markersize=12)
- matplotlib.pyplot.savefig("dark.png", bbox_inches='tight', facecolor=fig.get_facecolor(), transparent=True)
- ## from hw5
- ax = data['SeriousDlqin2yrs'].hist(orientation='horizontal', color='red')
- ax.spines['bottom'].set_color('white')
- ax.spines['left'].set_color('white')
- ax.title.set_color('white')
- ax.yaxis.label.set_color('white')
- ax.xaxis.label.set_color('white')
- ax.tick_params(axis='x', colors='white')
- ax.tick_params(axis='y', colors='white')
- ax.set_facecolor((0.01, 0.01, 0.01))
- ax.grid(color='white')
- ax.set_xlabel("number_of_observations")
- ax.set_ylabel("unique_value")
- ax.set_title("Target distribution")
- print('Distribution of target:')
- data['SeriousDlqin2yrs'].value_counts() / data.shape[0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement