@@ -168,7 +168,7 @@ def left_upper_cb(x):
168
168
helpers .plot_min_crossings (outfile , optimal_path , self .crossings , alpha , rep , est ,
169
169
1 , upper_cb , lower_cb , left_upper_cb , ** kwargs )
170
170
171
- def pp_plot (self , confidence_band = True , alpha = 0.05 , outfile = False , ** kwargs ):
171
+ def pp_plot (self , confidence_band = True , alpha = 0.05 , outfile = None , ** kwargs ):
172
172
""" create the pp plot
173
173
:param confidence_band: Boolean value of whether to include the confidence band in the plot
174
174
:param outfile: location and name of file to be saved
@@ -201,25 +201,25 @@ def pp_plot(self, confidence_band = True, alpha = 0.05, outfile=False, **kwargs)
201
201
202
202
plt .figure (figsize = (10 , 10 ))
203
203
if confidence_band == True :
204
- plt .fill_between (dkw_xgrid , dkw_lbound , dkw_ubound , color = plt_set ['bandcolor' ], label = 'Confidence band' , alpha = 0.25 )
204
+ plt .fill_between (dkw_xgrid , dkw_lbound , dkw_ubound , color = plt_set ['bandcolor' ], label = 'Confidence band' , alpha = 0.35 )
205
205
plt .scatter (replicates_eval_normcdf , replicate_ecdf , s = plt_set ['pointsize' ],
206
206
c = plt_set ['pointcolor' ], label = 'Bootstrap replicates' )
207
207
plt .xlabel ("CDF of normal distribution" )
208
- plt .ylabel ("CDF of comparison distribution" )
208
+ plt .ylabel ("CDF of bootstrap distribution" )
209
209
plt .legend (edgecolor = 'k' , loc = 'upper left' )
210
210
plt .axline ((0 , 0 ), (1 , 1 ), color = "black" , linestyle = (0 , (5 , 5 )))
211
- plt .text (0.52 , 0.02 , plot_data , fontsize = plt_set ['legend_fontsize' ], \
211
+ plt .text (0.52 , 0.06 , plot_data , fontsize = plt_set ['legend_fontsize' ], \
212
212
verticalalignment = 'bottom' , horizontalalignment = 'left' , bbox = props )
213
- plt .ylim (- 0.05 , 1.05 )
214
- plt .xlim (- 0.05 , 1.05 )
213
+ plt .ylim (0 , 1 )
214
+ plt .xlim (0 , 1 )
215
215
216
- if outfile :
216
+ if not outfile == None :
217
217
plt .savefig (outfile , transparent = True , dpi = plt_set ['dpi' ])
218
218
plt .clf ()
219
219
mpl .rcParams .update (mpl .rcParamsDefault )
220
220
221
221
222
- def density_plot (self , bounds = None , bandwidth = None , outfile = False , ** kwargs ):
222
+ def density_plot (self , bounds = None , bandwidth = None , outfile = None , ** kwargs ):
223
223
""" creates a smoothed density plot of replicates and shows the plot or outputs the result to outfile
224
224
:param bounds: a tuple or list of the bounds of the density plot | Optional
225
225
:param bandwidth: the bandwidth that the replicates are evaluated at when taking the kernel density estimate | Optional
@@ -251,7 +251,7 @@ def density_plot(self, bounds = None, bandwidth = None, outfile = False, **kwarg
251
251
plt .plot ([self .replicates [0 ], self .replicates [- 1 ]], [0.0001 , 0.0001 ], '|k' , markeredgewidth = 1 , label = 'Range of bootstrap replicates' )
252
252
plt .legend (loc = 'best' , fontsize = 'x-small' , markerscale = 0.75 )
253
253
254
- if outfile :
254
+ if not outfile == None :
255
255
plt .savefig (outfile , transparent = True , dpi = plt_set ['dpi' ])
256
256
plt .clf ()
257
257
mpl .rcParams .update (mpl .rcParamsDefault )
0 commit comments