Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1594456

Browse files
committed
Added axes to arguments
1 parent db1b6a5 commit 1594456

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sfs/plot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ def _register_coolwarm_clip():
2323
_register_coolwarm_clip()
2424

2525

26-
def virtualsource_2d(xs, ns=None, type='point'):
26+
def virtualsource_2d(xs, ns=None, type='point', ax=None):
2727
"""Draw position/orientation of virtual source."""
2828
xs = np.asarray(xs)
2929
ns = np.asarray(ns)
30-
ax = plt.axes()
30+
if ax is None:
31+
ax = plt.axes()
3132

3233
if type == 'point':
3334
vps = plt.Circle(xs, .05, edgecolor='k', facecolor='k')

0 commit comments

Comments
 (0)