Skip to content

Commit

Permalink
Merge pull request #162 from DHI/return_ax
Browse files Browse the repository at this point in the history
return AX in scatter
  • Loading branch information
jsmariegaard authored Jan 27, 2023
2 parents 2c0f988 + a5fed1b commit f688397
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion fmskill/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ def scatter(
skill_df = None
units = None

scatter(
ax=scatter(
x=x,
y=y,
bins=bins,
Expand All @@ -1028,6 +1028,7 @@ def scatter(
nbins=nbins,
**kwargs,
)
return ax

def taylor(
self,
Expand Down
5 changes: 3 additions & 2 deletions fmskill/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def scatter(
reglabel = f"Fit: y={slope:.2f}x{sign}{intercept:.2f}"

if backend == "matplotlib":

plt.figure(figsize=figsize)
_,ax=plt.subplots(figsize=figsize)
#plt.figure(figsize=figsize)
plt.plot(
[xlim[0], xlim[1]],
[xlim[0], xlim[1]],
Expand Down Expand Up @@ -305,6 +305,7 @@ def scatter(
# Add skill table
if skill_df != None:
_plot_summary_table(skill_df, units, max_cbar=max_cbar)
return ax

elif backend == "plotly": # pragma: no cover
import plotly.graph_objects as go
Expand Down

0 comments on commit f688397

Please sign in to comment.