summaryrefslogtreecommitdiff
path: root/examples/fftPlotAction.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2018-03-04 10:20:27 +0100
committerPicca Frédéric-Emmanuel <picca@debian.org>2018-03-04 10:20:27 +0100
commit270d5ddc31c26b62379e3caa9044dd75ccc71847 (patch)
tree55c5bfc851dfce7172d335cd2405b214323e3caf /examples/fftPlotAction.py
parente19c96eff0c310c06c4f268c8b80cb33bd08996f (diff)
New upstream version 0.7.0+dfsg
Diffstat (limited to 'examples/fftPlotAction.py')
-rwxr-xr-xexamples/fftPlotAction.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/fftPlotAction.py b/examples/fftPlotAction.py
index 66ecfbd..877225f 100755
--- a/examples/fftPlotAction.py
+++ b/examples/fftPlotAction.py
@@ -2,7 +2,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2018 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
@@ -23,8 +23,8 @@
# THE SOFTWARE.
#
# ###########################################################################*/
-"""This script is a simple example of how to create a PlotWindow with a custom
-PlotAction added to the toolbar.
+"""This script is a simple example of how to create a :class:`~silx.gui.plot.PlotWindow`
+with a custom :class:`~silx.gui.plot.actions.PlotAction` added to the toolbar.
The action computes the FFT of all curves and plots their amplitude spectrum.
It also performs the reverse transform.
@@ -179,7 +179,7 @@ y2 = numpy.cos(twopi * 7 * (x - numpy.pi / 3))
# 5 periods of square wave, amplitude 2
y3 = numpy.zeros_like(x)
for i in [0, 2, 4, 6, 8]:
- y3[i * len(x) / 10:(i + 1) * len(x) / 10] = 2
+ y3[i * len(x) // 10:(i + 1) * len(x) // 10] = 2
plotwin.addCurve(x, y1, legend="sin")
plotwin.addCurve(x, y2, legend="cos")