Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcedc3f3

Browse files
author
minjk-bl
committed
Edit vp_seaborn_show_values function code to check isnan for x, y coordinates of value position
1 parentbb93591 commitcedc3f3

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

‎python/userCommand.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,16 @@ def _single(ax):
119119
forpinax.patches:
120120
_x=p.get_x()+p.get_width()/2
121121
_y=p.get_y()+p.get_height()+ (p.get_height()*space)
122-
value=pstr.format(p.get_height())
123-
ax.text(_x,_y,value,ha='center')
122+
ifnot_vp_np.isnan(_x)andnot_vp_np.isnan(_y):
123+
value=pstr.format(p.get_height())
124+
ax.text(_x,_y,value,ha='center')
124125
eliforient=='h':
125126
forpinax.patches:
126127
_x=p.get_x()+p.get_width()+ (space-0.01)
127128
_y=p.get_y()+p.get_height()/2
128-
value=pstr.format(p.get_width())
129-
ax.text(_x,_y,value,ha='left')
129+
ifnot_vp_np.isnan(_x)andnot_vp_np.isnan(_y):
130+
value=pstr.format(p.get_width())
131+
ax.text(_x,_y,value,ha='left')
130132

131133
ifisinstance(axs,_vp_np.ndarray):
132134
foridx,axin_vp_np.ndenumerate(axs):

‎python/visualizationCommand.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ def _single(ax):
2424
forpinax.patches:
2525
_x=p.get_x()+p.get_width()/2
2626
_y=p.get_y()+p.get_height()+ (p.get_height()*space)
27-
value=pstr.format(p.get_height())
28-
ax.text(_x,_y,value,ha='center')
27+
ifnot_vp_np.isnan(_x)andnot_vp_np.isnan(_y):
28+
value=pstr.format(p.get_height())
29+
ax.text(_x,_y,value,ha='center')
2930
eliforient=='h':
3031
forpinax.patches:
3132
_x=p.get_x()+p.get_width()+ (space-0.01)
3233
_y=p.get_y()+p.get_height()/2
33-
value=pstr.format(p.get_width())
34-
ax.text(_x,_y,value,ha='left')
34+
ifnot_vp_np.isnan(_x)andnot_vp_np.isnan(_y):
35+
value=pstr.format(p.get_width())
36+
ax.text(_x,_y,value,ha='left')
3537

3638
ifisinstance(axs,_vp_np.ndarray):
3739
foridx,axin_vp_np.ndenumerate(axs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp