Skip to content

Commit

Permalink
ENH: PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTheisen committed Dec 11, 2023
1 parent 7ee9fba commit af499fe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
14 changes: 7 additions & 7 deletions act/plotting/distributiondisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,13 +823,13 @@ def plot_violin(self,

# Display the scatter plot, pass keyword args for unspecified attributes
scc = self.axes[subplot_index].violinplot(ndata,
positions=positions,
vert=vert,
showmeans=showmeans,
showmedians=showmedians,
showextrema=showextrema,
**kwargs
)
positions=positions,
vert=vert,
showmeans=showmeans,
showmedians=showmedians,
showextrema=showextrema,
**kwargs
)
if showmeans is True:
scc['cmeans'].set_edgecolor('red')
scc['cmeans'].set_label('mean')
Expand Down
34 changes: 17 additions & 17 deletions examples/plotting/plot_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@

# Plot the best fit line
display.axes[0].plot(ds['true_airspeed'],
p(ds['true_airspeed']),
'r',
linewidth=2
)
p(ds['true_airspeed']),
'r',
linewidth=2
)

# Display the line equation
display.axes[0].text(45,
135,
"y = %.3fx + (%.3f)" % (z[0], z[1]),
color='r',
fontsize=12
)
135,
"y = %.3fx + (%.3f)" % (z[0], z[1]),
color='r',
fontsize=12
)

# Calculate Pearson Correlation Coefficient
cc_conc = pearsonr(ds['true_airspeed'],
Expand All @@ -67,17 +67,17 @@

# Display the Pearson CC
display.axes[0].text(45,
130,
"Pearson CC: %.2f" % (cc_conc[0]),
fontsize=12
)
130,
"Pearson CC: %.2f" % (cc_conc[0]),
fontsize=12
)

# Display the total number of samples
display.axes[0].text(45,
125,
"N = %.0f" % (ds['true_airspeed'].data.shape[0]),
fontsize=12
)
125,
"N = %.0f" % (ds['true_airspeed'].data.shape[0]),
fontsize=12
)

# Display the 1:1 ratio line
display.set_ratio_line()
Expand Down

0 comments on commit af499fe

Please sign in to comment.