summaryrefslogtreecommitdiff
path: root/silx/gui/plot/backends/BackendBase.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/backends/BackendBase.py')
-rwxr-xr-xsilx/gui/plot/backends/BackendBase.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/silx/gui/plot/backends/BackendBase.py b/silx/gui/plot/backends/BackendBase.py
index bcc93a5..6fc1aa7 100755
--- a/silx/gui/plot/backends/BackendBase.py
+++ b/silx/gui/plot/backends/BackendBase.py
@@ -58,8 +58,8 @@ class BackendBase(object):
self.__yLimits = {'left': (1., 100.), 'right': (1., 100.)}
self.__yAxisInverted = False
self.__keepDataAspectRatio = False
+ self.__xAxisTimeSeries = False
self._xAxisTimeZone = None
- self._axesDisplayed = True
# Store a weakref to get access to the plot state.
self._setPlot(plot)
@@ -457,14 +457,14 @@ class BackendBase(object):
:rtype: bool
"""
- raise NotImplementedError()
+ return self.__xAxisTimeSeries
def setXAxisTimeSeries(self, isTimeSeries):
"""Set whether the X-axis is a time series
:param bool flag: True to switch to time series, False for regular axis.
"""
- raise NotImplementedError()
+ self.__xAxisTimeSeries = bool(isTimeSeries)
def setXAxisLogarithmic(self, flag):
"""Set the X axis scale between linear and log.
@@ -548,20 +548,17 @@ class BackendBase(object):
"""
raise NotImplementedError()
- def setAxesDisplayed(self, displayed):
- """Display or not the axes.
+ def setAxesMargins(self, left: float, top: float, right: float, bottom: float):
+ """Set the size of plot margins as ratios.
- :param bool displayed: If `True` axes are displayed. If `False` axes
- are not anymore visible and the margin used for them is removed.
- """
- self._axesDisplayed = displayed
+ Values are expected in [0., 1.]
- def isAxesDisplayed(self):
- """private because in some case it is possible that one of the two axes
- are displayed and not the other.
- This only check status set to axes from the public API
+ :param float left:
+ :param float top:
+ :param float right:
+ :param float bottom:
"""
- return self._axesDisplayed
+ pass
def setForegroundColors(self, foregroundColor, gridColor):
"""Set foreground and grid colors used to display this widget.