summaryrefslogtreecommitdiff
path: root/examples/plotCurveLegendWidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/plotCurveLegendWidget.py')
-rw-r--r--examples/plotCurveLegendWidget.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/plotCurveLegendWidget.py b/examples/plotCurveLegendWidget.py
index 9209c58..97c516a 100644
--- a/examples/plotCurveLegendWidget.py
+++ b/examples/plotCurveLegendWidget.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2018 European Synchrotron Radiation Facility
+# Copyright (c) 2018-2020 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -71,7 +71,7 @@ class MyCurveLegendsWidget(CurveLegendsWidget):
"""
plot = curve.getPlot()
plot.setActiveCurve(
- curve.getLegend() if curve != plot.getActiveCurve() else None)
+ curve.getName() if curve != plot.getActiveCurve() else None)
def _switchCurveVisibility(self, curve):
"""Toggle the visibility of a curve
@@ -86,7 +86,7 @@ class MyCurveLegendsWidget(CurveLegendsWidget):
:param silx.gui.plot.items.Curve curve:
"""
yaxis = curve.getYAxis()
- curve.setYAxis('left' if yaxis is 'right' else 'right')
+ curve.setYAxis('left' if yaxis == 'right' else 'right')
def _contextMenu(self, pos):
"""Create a show the context menu.