Skip to content

Commit 77c8377

Browse files
committed
in 2d 'square_xy' is the same as 'square'
Instead of throwing an error
1 parent 2eeecf0 commit 77c8377

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gnuplotlib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class gnuplotlib has a separate gnuplot process and a plot window. If multiple
431431
432432
If True, these request a square aspect ratio. For 3D plots, square_xy plots with
433433
a square aspect ratio in x and y, but scales z. square_xy and square-xy and
434-
squarexy are synonyms. Using any of these in 3D
434+
squarexy are synonyms. In 2D, these are all synonyms. Using any of these in 3D
435435
requires Gnuplot >= 4.4
436436
437437
- {x,y,y2,z,cb}{min,max,range,inv}
@@ -1153,8 +1153,9 @@ def massageSubplotOptionsAndGetCmds(subplotOptions):
11531153
if 'square_xy' in subplotOptions: del subplotOptions['square_xy']
11541154
if 'square' in subplotOptions: del subplotOptions['square' ]
11551155
else:
1156+
# In 2D square_xy is the same as square
11561157
if subplotOptions.get('square_xy'):
1157-
raise GnuplotlibError("'square_xy' only makes sense with '3d'")
1158+
subplotOptions['square'] = True
11581159

11591160

11601161
# grid on by default

0 commit comments

Comments
 (0)