From f19df05bdf273bcf51de45859cd81d8ba060ed66 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Fri, 18 Oct 2013 15:02:17 -0400 Subject: [PATCH] Allow AxisItem.setScale(None) to retain API backward compatibility. --- pyqtgraph/graphicsItems/AxisItem.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyqtgraph/graphicsItems/AxisItem.py b/pyqtgraph/graphicsItems/AxisItem.py index 531e3e9a..93efb45c 100644 --- a/pyqtgraph/graphicsItems/AxisItem.py +++ b/pyqtgraph/graphicsItems/AxisItem.py @@ -293,6 +293,11 @@ class AxisItem(GraphicsWidget): the view coordinate system were scaled. By default, the axis scaling is 1.0. """ + # Deprecated usage, kept for backward compatibility + if scale is None: + scale = 1.0 + self.enableAutoSIPrefix(True) + if scale != self.scale: self.scale = scale self.setLabel()