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

Skip to content

Commit 73166e3

Browse files
committed
We now throw an error for xaxis0 and yaxis0 keys, missed this before.
1 parent 2f0a46a commit 73166e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plotly/graph_objs/graph_objs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,9 @@ def to_graph_objs(self):
11391139
if isinstance(self[key], dict):
11401140
if key[:5] == 'xaxis': # allows appended integers!
11411141
try:
1142-
test_if_int = int(key[5:])
1142+
axis_int = int(key[5:])
1143+
if axis_int == 0:
1144+
continue
11431145
obj = XAxis()
11441146
for k, v in self.pop(key).items():
11451147
obj[k] = v
@@ -1149,7 +1151,9 @@ def to_graph_objs(self):
11491151
pass
11501152
elif key[:5] == 'yaxis': # allows appended integers!
11511153
try:
1152-
test_if_int = int(key[5:])
1154+
axis_int = int(key[5:])
1155+
if axis_int == 0:
1156+
continue
11531157
obj = YAxis()
11541158
for k, v in self.pop(key).items():
11551159
obj[k] = v

0 commit comments

Comments
 (0)