[python-qwt] 01/03: Imported Upstream version 6.1.2~a6

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Fri Aug 28 11:27:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to branch master
in repository python-qwt.

commit 52378c0e5371478c479d6ab50ed3ec713f01ce69
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Fri Aug 28 12:41:34 2015 +0200

    Imported Upstream version 6.1.2~a6
---
 LICENSE                         | 597 +++++++++++++++++++++++++++++++++++++++-
 MANIFEST.in                     |   4 +-
 PKG-INFO                        |   2 +-
 QwtLicense                      | 543 ------------------------------------
 README                          |  39 ++-
 examples/BodeDemo.py            | 297 ++++++++++++++++++++
 examples/CPUplot.py             | 391 ++++++++++++++++++++++++++
 examples/CartesianDemo.py       |  94 +++++++
 examples/CurveDemo1.py          | 123 +++++++++
 examples/CurveDemo2.py          | 130 +++++++++
 examples/DataDemo.py            |  97 +++++++
 examples/ErrorBarDemo.py        | 281 +++++++++++++++++++
 examples/EventFilterDemo.py     | 451 ++++++++++++++++++++++++++++++
 examples/HistogramDemo.py       | 214 ++++++++++++++
 examples/ImagePlotDemo.py       | 184 +++++++++++++
 examples/MapDemo.py             | 106 +++++++
 examples/MultiDemo.py           |  73 +++++
 examples/ReallySimpleDemo.py    |  66 +++++
 python_qwt.egg-info/PKG-INFO    |   2 +-
 python_qwt.egg-info/SOURCES.txt |  14 +-
 qwt/__init__.py                 |   8 +-
 qwt/clipper.py                  |   6 +-
 qwt/color_map.py                |   6 +-
 qwt/column_symbol.py            |   6 +-
 qwt/curve_fitter.py             |   6 +-
 qwt/dyngrid_layout.py           |   6 +-
 qwt/graphic.py                  |   6 +-
 qwt/interval.py                 |   6 +-
 qwt/legend.py                   |   6 +-
 qwt/legend_data.py              |   6 +-
 qwt/legend_label.py             |   6 +-
 qwt/math.py                     |   6 +-
 qwt/null_paintdevice.py         |   6 +-
 qwt/painter.py                  |   6 +-
 qwt/painter_command.py          |   6 +-
 qwt/pixel_matrix.py             |   6 +-
 qwt/plot.py                     |   6 +-
 qwt/plot_canvas.py              |   6 +-
 qwt/plot_curve.py               |   6 +-
 qwt/plot_directpainter.py       |   6 +-
 qwt/plot_grid.py                |   6 +-
 qwt/plot_histogram.py           |   6 +-
 qwt/plot_layout.py              |   6 +-
 qwt/plot_marker.py              |   6 +-
 qwt/plot_renderer.py            |   6 +-
 qwt/plot_seriesitem.py          |   6 +-
 qwt/point_data.py               |   6 +-
 qwt/point_mapper.py             |   6 +-
 qwt/py3compat.py                |   2 +-
 qwt/qt/QtCore.py                |  58 ++--
 qwt/qt/QtGui.py                 |  40 +--
 qwt/qt/QtSvg.py                 |  28 +-
 qwt/qt/QtWebKit.py              |  32 +--
 qwt/qt/__init__.py              | 126 ++++-----
 qwt/qt/compat.py                |   2 +-
 qwt/sample.py                   |   6 +-
 qwt/scale_div.py                |   6 +-
 qwt/scale_draw.py               |   6 +-
 qwt/scale_engine.py             |   6 +-
 qwt/scale_map.py                |   6 +-
 qwt/scale_widget.py             |   6 +-
 qwt/series_data.py              |   6 +-
 qwt/series_store.py             |   6 +-
 qwt/spline.py                   |   6 +-
 qwt/symbol.py                   |   6 +-
 qwt/text.py                     |   6 +-
 qwt/text_engine.py              |   6 +-
 qwt/transform.py                |   6 +-
 setup.py                        | 273 +++++++++---------
 69 files changed, 3585 insertions(+), 932 deletions(-)

diff --git a/LICENSE b/LICENSE
index c7f198f..4a49c10 100644
--- a/LICENSE
+++ b/LICENSE
@@ -3,22 +3,20 @@ python-qwt License Agreement
 
 [1] Software licensed under the terms of Qwt License
 
-The essential part of the code was translated directly to Python from Qwt C++ 
-library and is thus licensed under the terms of the Qwt License 1.0 which is 
-derived from LGPL (see included 'QwtLicense' file for more details).
-Copyright (C) 2002 Uwe Rathmann
+The essential part of the code was translated to Python from Qwt C++ library 
+and is thus licensed under the terms of the LGPL License from which the Qwt 
+License 1.0 is derived from (see [***] for more details).
 
 [2] Software licensed under the terms of the MIT license
 
 Independent Python modules purely based on new code (no contamination from the
-LGPL license inherited from the Qwt Project) are based on under the terms of 
-the MIT License (see [*]). Those exceptions will be clearly mentioned in file 
-header.
+LGPL license inherited from the Qwt Project) are distributed under the terms 
+of the MIT License (see [*] and [**]).
 
 
-[*] MIT license terms
+[*] python-qwt License Agreement for new and exclusive Python material (MIT)
 
-Copyright (c) 2014-2015 Pierre Raybaut
+Copyright (c) 2015 Pierre Raybaut
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
@@ -40,3 +38,584 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
+
+
+[**] Spyder License Agreement
+
+Spyder License Agreement (MIT License)
+--------------------------------------
+
+Copyright (c) 2009-2013 Pierre Raybaut
+Copyright (c) 2013-2015 The Spyder Development Team
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+[***] python-qwt License Agreement for code translated from C++ (Qwt License)
+
+Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+Copyright (c) 2015 Pierre Raybaut, for the Python translation and optimization
+
+
+                             Qwt License
+                     Version 1.0, January 1, 2003
+
+The Qwt library and included programs are provided under the terms
+of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) with the following
+exceptions:
+
+    1. Widgets that are subclassed from Qwt widgets do not
+       constitute a derivative work.
+
+    2. Static linking of applications and widgets to the
+       Qwt library does not constitute a derivative work
+       and does not require the author to provide source
+       code for the application or widget, use the shared
+       Qwt libraries, or link their applications or
+       widgets against a user-supplied version of Qwt.
+
+       If you link the application or widget to a modified
+       version of Qwt, then the changes to Qwt must be 
+       provided under the terms of the LGPL in sections
+       1, 2, and 4.
+
+    3. You do not have to provide a copy of the Qwt license
+       with programs that are linked to the Qwt library, nor
+       do you have to identify the Qwt license in your
+       program or documentation as required by section 6
+       of the LGPL.
+
+
+       However, programs must still identify their use of Qwt.
+       The following example statement can be included in user
+       documentation to satisfy this requirement:
+
+           [program/widget] is based in part on the work of
+           the Qwt project (http://qwt.sf.net).
+
+----------------------------------------------------------------------
+
+
+          GNU LESSER GENERAL PUBLIC LICENSE
+               Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+          GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+             END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/MANIFEST.in b/MANIFEST.in
index 5b6fa1a..1def0a7 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,8 +1,8 @@
 recursive-include qwt *.png *.svg *.pot *.po *.mo *.dcm *.ui
+recursive-include examples *.py *.png *.svg *.pot *.po *.mo *.dcm *.ui
 recursive-include src *.hpp *.cpp *.pyx
 recursive-include doc *.py *.rst *.png *.ico
 include MANIFEST.in
 include LICENSE
 include README
-include CHANGELOG
-include QwtLicense 
\ No newline at end of file
+include CHANGELOG 
\ No newline at end of file
diff --git a/PKG-INFO b/PKG-INFO
index 21a429f..44de04f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-qwt
-Version: 6.1.2a5
+Version: 6.1.2a6
 Summary: Qt plotting widgets for Python
 Home-page: https://github.com/PierreRaybaut/python-qwt
 Author: Pierre Raybaut
diff --git a/QwtLicense b/QwtLicense
deleted file mode 100644
index 9c01f7e..0000000
--- a/QwtLicense
+++ /dev/null
@@ -1,543 +0,0 @@
-                             Qwt License
-                           Version 1.0, January 1, 2003
-
-The Qwt library and included programs are provided under the terms
-of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) with the following
-exceptions:
-
-    1. Widgets that are subclassed from Qwt widgets do not
-       constitute a derivative work.
-
-    2. Static linking of applications and widgets to the
-       Qwt library does not constitute a derivative work
-       and does not require the author to provide source
-       code for the application or widget, use the shared
-       Qwt libraries, or link their applications or
-       widgets against a user-supplied version of Qwt.
-
-       If you link the application or widget to a modified
-       version of Qwt, then the changes to Qwt must be 
-       provided under the terms of the LGPL in sections
-       1, 2, and 4.
-
-    3. You do not have to provide a copy of the Qwt license
-       with programs that are linked to the Qwt library, nor
-       do you have to identify the Qwt license in your
-       program or documentation as required by section 6
-       of the LGPL.
-
-
-       However, programs must still identify their use of Qwt.
-       The following example statement can be included in user
-       documentation to satisfy this requirement:
-
-           [program/widget] is based in part on the work of
-           the Qwt project (http://qwt.sf.net).
-
-----------------------------------------------------------------------
-
-
-          GNU LESSER GENERAL PUBLIC LICENSE
-               Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-          GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-             END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/README b/README
index ea69d4b..c29c6ef 100644
--- a/README
+++ b/README
@@ -1,22 +1,37 @@
 python-qwt
 ==========
 
-    Written by Pierre Raybaut
+    Purpose and Motivation
 
       The ``python-qwt`` project was initiated to solve -at least temporarily- 
       the obsolescence issue of `PyQwt` (the Python-Qwt C++ bindings library) 
-      which is no longer maintained. The idea was to translate the Qwt C++ code 
-      to Python and then to optimize some parts of the code by writing new 
-      modules based on NumPy and other libraries.
+      which is no longer maintained. The idea was to translate the original 
+      Qwt C++ code to Python and then to optimize some parts of the code by 
+      writing new modules based on NumPy and other libraries.
       
-      The ``python-qwt`` project consists of a single Python package named `qwt` 
-      and of a few other files (examples, doc, ...).
-
-      The `qwt` Python package was partly (95%) translated from Qwt C++ library: 
-      the associated code is licensed under the terms of the Qwt license 1.0 
-      (see qwt/QwtLicense, Copyright (C) 2002 Uwe Rathmann). The rest of the 
-      code was wrote from scratch and is licensed under the terms of the MIT 
-      License (see qwt/LICENSE).
+      The ``python-qwt`` package consists of a single Python package named 
+      `qwt` and of a few other files (examples, doc, ...).
+
+    Copyrights
+
+      Main code base
+        Copyright (c) 2002 Uwe Rathmann, for the original Qwt C++ code
+        Copyright (c) 2015 Pierre Raybaut, for the Qwt C++ to Python 
+        translation and optimization
+        Copyright (c) 2015 Pierre Raybaut, for the python-qwt specific and 
+        exclusive Python material
+
+      PyQt, PySide and Python2/Python3 compatibility modules
+        Copyright (c) 2009-2013 Pierre Raybaut
+        Copyright (c) 2013-2015 The Spyder Development Team
+
+    License
+
+      The `qwt` Python package was partly (>95%) translated from Qwt C++ 
+      library: the associated code is distributed under the terms of the LGPL 
+      license. The rest of the code was either wrote from scratch or strongly 
+      inspired from MIT licensed third-party software.
+      See included LICENSE file for more details about licensing terms.
 
     Overview
 
diff --git a/examples/BodeDemo.py b/examples/BodeDemo.py
new file mode 100644
index 0000000..3d63d02
--- /dev/null
+++ b/examples/BodeDemo.py
@@ -0,0 +1,297 @@
+#!/usr/bin/env python
+
+# The Python version of Qwt-5.1.1/examples/bode
+
+# To get an impression of the expressive power of NumPy,
+# compare the Python and C++ versions of setDamp()
+
+# BodeDemo.py requires at least Python v2.6.
+from __future__ import unicode_literals
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import (QApplication, QPen, QBrush, QFrame, QFont, QWidget,
+                          QMainWindow, QToolButton, QIcon, QPixmap, QToolBar,
+                          QHBoxLayout, QLabel, QPrinter, QPrintDialog,
+                          QFontDatabase)
+from qwt.qt.QtCore import QSize
+from qwt.qt.QtCore import Qt
+from qwt import (QwtPlot, QwtPlotMarker, QwtSymbol, QwtLegend, QwtPlotGrid,
+                 QwtPlotCurve, QwtPlotItem, QwtLogScaleEngine, QwtText,
+                 QwtPlotRenderer)
+
+
+print_xpm = ['32 32 12 1',
+             'a c #ffffff',
+             'h c #ffff00',
+             'c c #ffffff',
+             'f c #dcdcdc',
+             'b c #c0c0c0',
+             'j c #a0a0a4',
+             'e c #808080',
+             'g c #808000',
+             'd c #585858',
+             'i c #00ff00',
+             '# c #000000',
+             '. c None',
+             '................................',
+             '................................',
+             '...........###..................',
+             '..........#abb###...............',
+             '.........#aabbbbb###............',
+             '.........#ddaaabbbbb###.........',
+             '........#ddddddaaabbbbb###......',
+             '.......#deffddddddaaabbbbb###...',
+             '......#deaaabbbddddddaaabbbbb###',
+             '.....#deaaaaaaabbbddddddaaabbbb#',
+             '....#deaaabbbaaaa#ddedddfggaaad#',
+             '...#deaaaaaaaaaa#ddeeeeafgggfdd#',
+             '..#deaaabbbaaaa#ddeeeeabbbbgfdd#',
+             '.#deeefaaaaaaa#ddeeeeabbhhbbadd#',
+             '#aabbbeeefaaa#ddeeeeabbbbbbaddd#',
+             '#bbaaabbbeee#ddeeeeabbiibbadddd#',
+             '#bbbbbaaabbbeeeeeeabbbbbbaddddd#',
+             '#bjbbbbbbaaabbbbeabbbbbbadddddd#',
+             '#bjjjjbbbbbbaaaeabbbbbbaddddddd#',
+             '#bjaaajjjbbbbbbaaabbbbadddddddd#',
+             '#bbbbbaaajjjbbbbbbaaaaddddddddd#',
+             '#bjbbbbbbaaajjjbbbbbbddddddddd#.',
+             '#bjjjjbbbbbbaaajjjbbbdddddddd#..',
+             '#bjaaajjjbbbbbbjaajjbddddddd#...',
+             '#bbbbbaaajjjbbbjbbaabdddddd#....',
+             '###bbbbbbaaajjjjbbbbbddddd#.....',
+             '...###bbbbbbaaajbbbbbdddd#......',
+             '......###bbbbbbjbbbbbddd#.......',
+             '.........###bbbbbbbbbdd#........',
+             '............###bbbbbbd#.........',
+             '...............###bbb#..........',
+             '..................###...........']
+
+
+class BodePlot(QwtPlot):
+
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+
+        self.setTitle('Frequency Response of a 2<sup>nd</sup>-order System')
+        self.setCanvasBackground(Qt.darkBlue)
+
+        # legend
+        legend = QwtLegend()
+        legend.setFrameStyle(QFrame.Box | QFrame.Sunken)
+        self.insertLegend(legend, QwtPlot.BottomLegend)
+
+        # grid
+        self.grid = QwtPlotGrid()
+        self.grid.enableXMin(True)
+        self.grid.attach(self)
+
+        # axes
+        self.enableAxis(QwtPlot.yRight)
+        self.setAxisTitle(QwtPlot.xBottom, '\u03c9/\u03c9<sub>0</sub>')
+        self.setAxisTitle(QwtPlot.yLeft, 'Amplitude [dB]')
+        self.setAxisTitle(QwtPlot.yRight, 'Phase [\u00b0]')
+
+        self.setAxisMaxMajor(QwtPlot.xBottom, 6)
+        self.setAxisMaxMinor(QwtPlot.xBottom, 10)
+        self.setAxisScaleEngine(QwtPlot.xBottom, QwtLogScaleEngine())
+
+        # curves
+        self.curve1 = QwtPlotCurve('Amplitude')
+        self.curve1.setRenderHint(QwtPlotItem.RenderAntialiased);
+        self.curve1.setPen(QPen(Qt.yellow))
+        self.curve1.setYAxis(QwtPlot.yLeft)
+        self.curve1.attach(self)
+        
+        self.curve2 = QwtPlotCurve('Phase')
+        self.curve2.setRenderHint(QwtPlotItem.RenderAntialiased);
+        self.curve2.setPen(QPen(Qt.cyan))
+        self.curve2.setYAxis(QwtPlot.yRight)
+        self.curve2.attach(self)
+
+        # alias
+        fn = self.fontInfo().family()
+
+        # marker
+        self.dB3Marker = m = QwtPlotMarker()
+        m.setValue(0.0, 0.0)
+        m.setLineStyle(QwtPlotMarker.VLine)
+        m.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
+        m.setLinePen(QPen(Qt.green, 2, Qt.DashDotLine))
+        text = QwtText('')
+        text.setColor(Qt.green)
+        text.setBackgroundBrush(Qt.red)
+        text.setFont(QFont(fn, 12, QFont.Bold))
+        m.setLabel(text)
+        m.attach(self)
+
+        self.peakMarker = m = QwtPlotMarker()
+        m.setLineStyle(QwtPlotMarker.HLine)
+        m.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
+        m.setLinePen(QPen(Qt.red, 2, Qt.DashDotLine))
+        text = QwtText('')
+        text.setColor(Qt.red)
+        text.setBackgroundBrush(QBrush(self.canvasBackground()))
+        text.setFont(QFont(fn, 12, QFont.Bold))
+        
+        m.setLabel(text)
+        m.setSymbol(QwtSymbol(QwtSymbol.Diamond,
+                              QBrush(Qt.yellow),
+                              QPen(Qt.green),
+                              QSize(7,7)))
+        m.attach(self)
+
+        # text marker
+        m = QwtPlotMarker()
+        m.setValue(0.1, -20.0)
+        m.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
+        text = QwtText(
+            '[1-(\u03c9/\u03c9<sub>0</sub>)<sup>2</sup>+2j\u03c9/Q]'
+            '<sup>-1</sup>'
+            )
+        text.setFont(QFont(fn, 12, QFont.Bold))
+        text.setColor(Qt.blue)
+        text.setBackgroundBrush(QBrush(Qt.yellow))
+        text.setBorderPen(QPen(Qt.red, 2))
+        m.setLabel(text)
+        m.attach(self)
+
+        self.setDamp(0.01)
+
+    def showData(self, frequency, amplitude, phase):
+        self.curve1.setData(frequency, amplitude)
+        self.curve2.setData(frequency, phase)
+
+    def showPeak(self, frequency, amplitude):
+        self.peakMarker.setValue(frequency, amplitude)
+        label = self.peakMarker.label()
+        label.setText('Peak: %4g dB' % amplitude)
+        self.peakMarker.setLabel(label)
+
+    def show3dB(self, frequency):
+        self.dB3Marker.setValue(frequency, 0.0)
+        label = self.dB3Marker.label()
+        label.setText('-3dB at f = %4g' % frequency)
+        self.dB3Marker.setLabel(label)
+
+    def setDamp(self, d):
+        self.damping = d
+        # Numerical Python: f, g, a and p are NumPy arrays!
+        f = np.exp(np.log(10.0)*np.arange(-2, 2.02, 0.04))
+        g = 1.0/(1.0-f*f+2j*self.damping*f)
+        a = 20.0*np.log10(abs(g))
+        p = 180*np.arctan2(g.imag, g.real)/np.pi
+        # for show3dB
+        i3 = np.argmax(np.where(np.less(a, -3.0), a, -100.0))
+        f3 = f[i3] - (a[i3]+3.0)*(f[i3]-f[i3-1])/(a[i3]-a[i3-1])
+        # for showPeak
+        imax = np.argmax(a)
+
+        self.showPeak(f[imax], a[imax])
+        self.show3dB(f3)
+        self.showData(f, a, p)
+
+        self.replot()
+
+
+class BodeDemo(QMainWindow):
+
+    def __init__(self, *args):
+        QMainWindow.__init__(self, *args)
+
+        self.plot = BodePlot(self)
+        self.plot.setContentsMargins(5, 5, 5, 0)
+
+        self.setContextMenuPolicy(Qt.NoContextMenu)
+        
+        self.setCentralWidget(self.plot)
+
+        toolBar = QToolBar(self)
+        self.addToolBar(toolBar)
+
+        btnPrint = QToolButton(toolBar)
+        btnPrint.setText("Print")
+        btnPrint.setIcon(QIcon(QPixmap(print_xpm)))
+        btnPrint.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
+        toolBar.addWidget(btnPrint)
+        btnPrint.clicked.connect(self.print_)
+
+        btnExport = QToolButton(toolBar)
+        btnExport.setText("Export")
+        btnExport.setIcon(QIcon(QPixmap(print_xpm)))
+        btnExport.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
+        toolBar.addWidget(btnExport)
+        btnExport.clicked.connect(self.exportDocument)
+            
+        toolBar.addSeparator()
+
+        dampBox = QWidget(toolBar)
+        dampLayout = QHBoxLayout(dampBox)
+        dampLayout.setSpacing(0)
+        dampLayout.addWidget(QWidget(dampBox), 10) # spacer
+        dampLayout.addWidget(QLabel("Damping Factor", dampBox), 0)
+        dampLayout.addSpacing(10)
+
+        toolBar.addWidget(dampBox)
+
+        self.statusBar()
+        
+        self.showInfo()
+
+    def print_(self):
+        printer = QPrinter(QPrinter.HighResolution)
+
+        printer.setCreator('Bode example')
+        printer.setOrientation(QPrinter.Landscape)
+        printer.setColorMode(QPrinter.Color)
+
+        docName = str(self.plot.title().text())
+        if not docName:
+            docName.replace('\n', ' -- ')
+            printer.setDocName(docName)
+
+        dialog = QPrintDialog(printer)
+        if dialog.exec_():
+            renderer = QwtPlotRenderer()
+            if (QPrinter.GrayScale == printer.colorMode()):
+                renderer.setDiscardFlag(QwtPlotRenderer.DiscardBackground)
+                renderer.setDiscardFlag(QwtPlotRenderer.DiscardCanvasBackground)
+                renderer.setDiscardFlag(QwtPlotRenderer.DiscardCanvasFrame)
+                renderer.setLayoutFlag(QwtPlotRenderer.FrameWithScales)
+            renderer.renderTo(self.plot, printer)
+
+    def exportDocument(self):
+        renderer = QwtPlotRenderer(self.plot)
+        renderer.exportTo(self.plot, "bode")
+    
+    def showInfo(self, text=""):
+        self.statusBar().showMessage(text)
+                
+    def moved(self, point):
+        info = "Freq=%g, Ampl=%g, Phase=%g" % (
+            self.plot.invTransform(QwtPlot.xBottom, point.x()),
+            self.plot.invTransform(QwtPlot.yLeft, point.y()),
+            self.plot.invTransform(QwtPlot.yRight, point.y()))
+        self.showInfo(info)
+
+    def selected(self, _):
+        self.showInfo()
+
+
+def make():
+    demo = BodeDemo()
+    demo.resize(540, 400)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    fonts = QFontDatabase()
+    for name in ('Verdana', 'STIXGeneral'):
+        if name in fonts.families():
+            app.setFont(QFont(name))
+            break
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/CPUplot.py b/examples/CPUplot.py
new file mode 100644
index 0000000..6c3b850
--- /dev/null
+++ b/examples/CPUplot.py
@@ -0,0 +1,391 @@
+#!/usr/bin/env python
+
+import os
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import (QApplication, QColor, QBrush, QWidget, QVBoxLayout,
+                          QLabel)
+from qwt.qt.QtCore import QRect, QTime
+from qwt.qt.QtCore import Qt
+from qwt import (QwtPlot, QwtPlotMarker, QwtScaleDraw, QwtLegend, QwtPlotCurve,
+                 QwtPlotItem, QwtLegendData, QwtText)
+
+
+class CpuStat:
+    User = 0
+    Nice = 1
+    System = 2
+    Idle = 3
+    counter = 0
+    dummyValues = (
+        ( 103726, 0, 23484, 819556 ),
+        ( 103783, 0, 23489, 819604 ),
+        ( 103798, 0, 23490, 819688 ),
+        ( 103820, 0, 23490, 819766 ),
+        ( 103840, 0, 23493, 819843 ),
+        ( 103875, 0, 23499, 819902 ),
+        ( 103917, 0, 23504, 819955 ),
+        ( 103950, 0, 23508, 820018 ),
+        ( 103987, 0, 23510, 820079 ),
+        ( 104020, 0, 23513, 820143 ),
+        ( 104058, 0, 23514, 820204 ),
+        ( 104099, 0, 23520, 820257 ),
+        ( 104121, 0, 23525, 820330 ),
+        ( 104159, 0, 23530, 820387 ),
+        ( 104176, 0, 23534, 820466 ),
+        ( 104215, 0, 23538, 820523 ),
+        ( 104245, 0, 23541, 820590 ),
+        ( 104267, 0, 23545, 820664 ),
+        ( 104311, 0, 23555, 820710 ),
+        ( 104355, 0, 23565, 820756 ),
+        ( 104367, 0, 23567, 820842 ),
+        ( 104383, 0, 23572, 820921 ),
+        ( 104396, 0, 23577, 821003 ),
+        ( 104413, 0, 23579, 821084 ),
+        ( 104446, 0, 23588, 821142 ),
+        ( 104521, 0, 23594, 821161 ),
+        ( 104611, 0, 23604, 821161 ),
+        ( 104708, 0, 23607, 821161 ),
+        ( 104804, 0, 23611, 821161 ),
+        ( 104895, 0, 23620, 821161 ),
+        ( 104993, 0, 23622, 821161 ),
+        ( 105089, 0, 23626, 821161 ),
+        ( 105185, 0, 23630, 821161 ),
+        ( 105281, 0, 23634, 821161 ),
+        ( 105379, 0, 23636, 821161 ),
+        ( 105472, 0, 23643, 821161 ),
+        ( 105569, 0, 23646, 821161 ),
+        ( 105666, 0, 23649, 821161 ),
+        ( 105763, 0, 23652, 821161 ),
+        ( 105828, 0, 23661, 821187 ),
+        ( 105904, 0, 23666, 821206 ),
+        ( 105999, 0, 23671, 821206 ),
+        ( 106094, 0, 23676, 821206 ),
+        ( 106184, 0, 23686, 821206 ),
+        ( 106273, 0, 23692, 821211 ),
+        ( 106306, 0, 23700, 821270 ),
+        ( 106341, 0, 23703, 821332 ),
+        ( 106392, 0, 23709, 821375 ),
+        ( 106423, 0, 23715, 821438 ),
+        ( 106472, 0, 23721, 821483 ),
+        ( 106531, 0, 23727, 821517 ),
+        ( 106562, 0, 23732, 821582 ),
+        ( 106597, 0, 23736, 821643 ),
+        ( 106633, 0, 23737, 821706 ),
+        ( 106666, 0, 23742, 821768 ),
+        ( 106697, 0, 23744, 821835 ),
+        ( 106730, 0, 23748, 821898 ),
+        ( 106765, 0, 23751, 821960 ),
+        ( 106799, 0, 23754, 822023 ),
+        ( 106831, 0, 23758, 822087 ),
+        ( 106862, 0, 23761, 822153 ),
+        ( 106899, 0, 23763, 822214 ),
+        ( 106932, 0, 23766, 822278 ),
+        ( 106965, 0, 23768, 822343 ),
+        ( 107009, 0, 23771, 822396 ),
+        ( 107040, 0, 23775, 822461 ),
+        ( 107092, 0, 23780, 822504 ),
+        ( 107143, 0, 23787, 822546 ),
+        ( 107200, 0, 23795, 822581 ),
+        ( 107250, 0, 23803, 822623 ),
+        ( 107277, 0, 23810, 822689 ),
+        ( 107286, 0, 23810, 822780 ),
+        ( 107313, 0, 23817, 822846 ),
+        ( 107325, 0, 23818, 822933 ),
+        ( 107332, 0, 23818, 823026 ),
+        ( 107344, 0, 23821, 823111 ),
+        ( 107357, 0, 23821, 823198 ),
+        ( 107368, 0, 23823, 823284 ),
+        ( 107375, 0, 23824, 823377 ),
+        ( 107386, 0, 23825, 823465 ),
+        ( 107396, 0, 23826, 823554 ),
+        ( 107422, 0, 23830, 823624 ),
+        ( 107434, 0, 23831, 823711 ),
+        ( 107456, 0, 23835, 823785 ),
+        ( 107468, 0, 23838, 823870 ),
+        ( 107487, 0, 23840, 823949 ),
+        ( 107515, 0, 23843, 824018 ),
+        ( 107528, 0, 23846, 824102 ),
+        ( 107535, 0, 23851, 824190 ),
+        ( 107548, 0, 23853, 824275 ),
+        ( 107562, 0, 23857, 824357 ),
+        ( 107656, 0, 23863, 824357 ),
+        ( 107751, 0, 23868, 824357 ),
+        ( 107849, 0, 23870, 824357 ),
+        ( 107944, 0, 23875, 824357 ),
+        ( 108043, 0, 23876, 824357 ),
+        ( 108137, 0, 23882, 824357 ),
+        ( 108230, 0, 23889, 824357 ),
+        ( 108317, 0, 23902, 824357 ),
+        ( 108412, 0, 23907, 824357 ),
+        ( 108511, 0, 23908, 824357 ),
+        ( 108608, 0, 23911, 824357 ),
+        ( 108704, 0, 23915, 824357 ),
+        ( 108801, 0, 23918, 824357 ),
+        ( 108891, 0, 23928, 824357 ),
+        ( 108987, 0, 23932, 824357 ),
+        ( 109072, 0, 23943, 824361 ),
+        ( 109079, 0, 23943, 824454 ),
+        ( 109086, 0, 23944, 824546 ),
+        ( 109098, 0, 23950, 824628 ),
+        ( 109108, 0, 23955, 824713 ),
+        ( 109115, 0, 23957, 824804 ),
+        ( 109122, 0, 23958, 824896 ),
+        ( 109132, 0, 23959, 824985 ),
+        ( 109142, 0, 23961, 825073 ),
+        ( 109146, 0, 23962, 825168 ),
+        ( 109153, 0, 23964, 825259 ),
+        ( 109162, 0, 23966, 825348 ),
+        ( 109168, 0, 23969, 825439 ),
+        ( 109176, 0, 23971, 825529 ),
+        ( 109185, 0, 23974, 825617 ),
+        ( 109193, 0, 23977, 825706 ),
+        ( 109198, 0, 23978, 825800 ),
+        ( 109206, 0, 23978, 825892 ),
+        ( 109212, 0, 23981, 825983 ),
+        ( 109219, 0, 23981, 826076 ),
+        ( 109225, 0, 23981, 826170 ),
+        ( 109232, 0, 23984, 826260 ),
+        ( 109242, 0, 23984, 826350 ),
+        ( 109255, 0, 23986, 826435 ),
+        ( 109268, 0, 23987, 826521 ),
+        ( 109283, 0, 23990, 826603 ),
+        ( 109288, 0, 23991, 826697 ),
+        ( 109295, 0, 23993, 826788 ),
+        ( 109308, 0, 23994, 826874 ),
+        ( 109322, 0, 24009, 826945 ),
+        ( 109328, 0, 24011, 827037 ),
+        ( 109338, 0, 24012, 827126 ),
+        ( 109347, 0, 24012, 827217 ),
+        ( 109354, 0, 24017, 827305 ),
+        ( 109367, 0, 24017, 827392 ),
+        ( 109371, 0, 24019, 827486 ),
+        )
+    
+    def __init__(self):
+        self.procValues = self.__lookup()
+
+    def statistic(self):
+        values = self.__lookup()
+        userDelta = 0.0
+        for i in [CpuStat.User, CpuStat.Nice]:
+            userDelta += (values[i] - self.procValues[i])
+        systemDelta = values[CpuStat.System] - self.procValues[CpuStat.System]
+        totalDelta = 0.0
+        for i in range(len(self.procValues)):
+            totalDelta += (values[i] - self.procValues[i])
+        self.procValues = values
+        return 100.0*userDelta/totalDelta, 100.0*systemDelta/totalDelta
+
+    def upTime(self):
+        result = QTime()
+        for item in self.procValues:
+            result = result.addSecs(item/100)
+        return result
+
+    def __lookup(self):
+        if os.path.exists("/proc/stat"):
+            for line in open("/proc/stat"):
+                words = line.split()
+                if words[0] == "cpu" and len(words) >= 5:
+                    return [float(w) for w in words[1:]]
+        else:
+            result = CpuStat.dummyValues[CpuStat.counter]
+            CpuStat.counter += 1
+            CpuStat.counter %= len(CpuStat.dummyValues)
+            return result
+
+
+class CpuPieMarker(QwtPlotMarker):
+    def __init__(self, *args):
+        QwtPlotMarker.__init__(self, *args)
+        self.setZ(1000.0)
+        self.setRenderHint(QwtPlotItem.RenderAntialiased, True)
+        
+    def rtti(self):
+        return QwtPlotItem.Rtti_PlotUserItem
+
+    def draw(self, painter, xMap, yMap, rect):
+        margin = 5
+        pieRect = QRect()
+        pieRect.setX(rect.x() + margin)
+        pieRect.setY(rect.y() + margin)
+        pieRect.setHeight(yMap.transform(80.0))
+        pieRect.setWidth(pieRect.height())
+
+        angle = 3*5760/4
+        for key in ["User", "System", "Idle"]:
+            curve = self.plot().cpuPlotCurve(key)
+            if curve.dataSize():
+                value = int(5760*curve.sample(0).y()/100.0)
+                painter.save()
+                painter.setBrush(QBrush(curve.pen().color(),
+                                              Qt.SolidPattern))
+                painter.drawPie(pieRect, -angle, -value)
+                painter.restore()
+                angle += value
+
+
+class TimeScaleDraw(QwtScaleDraw):
+    def __init__(self, baseTime, *args):
+        QwtScaleDraw.__init__(self, *args)
+        self.baseTime = baseTime
+ 
+    def label(self, value):
+        upTime = self.baseTime.addSecs(int(value))
+        return QwtText(upTime.toString())
+
+
+class Background(QwtPlotItem):
+    def __init__(self):
+        QwtPlotItem.__init__(self)
+        self.setZ(0.0)
+
+    def rtti(self):
+        return QwtPlotItem.Rtti_PlotUserItem
+
+    def draw(self, painter, xMap, yMap, rect):
+        c = QColor(Qt.white)
+        r = QRect(rect)
+
+        for i in range(100, 0, -10):
+            r.setBottom(yMap.transform(i - 10))
+            r.setTop(yMap.transform(i))
+            painter.fillRect(r, c)
+            c = c.darker(110)
+
+
+class CpuCurve(QwtPlotCurve):
+    def __init__(self, *args):
+        QwtPlotCurve.__init__(self, *args)
+        self.setRenderHint(QwtPlotItem.RenderAntialiased)
+
+    def setColor(self, color):
+        c = QColor(color)
+        c.setAlpha(150)
+
+        self.setPen(c)
+        self.setBrush(c)
+
+    
+HISTORY = 60
+
+class CpuPlot(QwtPlot):
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+
+        self.curves = {}
+        self.data = {}
+        self.timeData = 1.0 * np.arange(HISTORY-1, -1, -1)
+        self.cpuStat = CpuStat()
+
+        self.setAutoReplot(False)
+
+        self.plotLayout().setAlignCanvasToScales(True)
+        
+        legend = QwtLegend()
+        legend.setDefaultItemMode(QwtLegendData.Checkable)
+        self.insertLegend(legend, QwtPlot.RightLegend)
+        
+        self.setAxisTitle(QwtPlot.xBottom, "System Uptime [h:m:s]")
+        self.setAxisScaleDraw(
+            QwtPlot.xBottom, TimeScaleDraw(self.cpuStat.upTime()))
+        self.setAxisScale(QwtPlot.xBottom, 0, HISTORY)
+        self.setAxisLabelRotation(QwtPlot.xBottom, -50.0)
+        self.setAxisLabelAlignment(
+            QwtPlot.xBottom, Qt.AlignLeft | Qt.AlignBottom)
+
+        self.setAxisTitle(QwtPlot.yLeft, "Cpu Usage [%]")
+        self.setAxisScale(QwtPlot.yLeft, 0, 100)
+
+        background = Background()
+        background.attach(self)
+
+        pie = CpuPieMarker()
+        pie.attach(self)
+        
+        curve = CpuCurve('System')
+        curve.setColor(Qt.red)
+        curve.attach(self)
+        self.curves['System'] = curve
+        self.data['System'] = np.zeros(HISTORY, np.float)
+
+        curve = CpuCurve('User')
+        curve.setColor(Qt.blue)
+        curve.setZ(curve.z() - 1.0)
+        curve.attach(self)
+        self.curves['User'] = curve
+        self.data['User'] = np.zeros(HISTORY, np.float)
+
+        curve = CpuCurve('Total')
+        curve.setColor(Qt.black)
+        curve.setZ(curve.z() - 2.0)
+        curve.attach(self)
+        self.curves['Total'] = curve
+        self.data['Total'] = np.zeros(HISTORY, np.float)
+
+        curve = CpuCurve('Idle')
+        curve.setColor(Qt.darkCyan)
+        curve.setZ(curve.z() - 3.0)
+        curve.attach(self)
+        self.curves['Idle'] = curve
+        self.data['Idle'] = np.zeros(HISTORY, np.float)
+
+        self.showCurve(self.curves['System'], True)
+        self.showCurve(self.curves['User'], True)
+        self.showCurve(self.curves['Total'], False)
+        self.showCurve(self.curves['Idle'], False)
+
+        self.startTimer(1000)
+
+        legend.SIG_CHECKED.connect(self.showCurve)
+        self.replot()
+
+    def timerEvent(self, e):
+        for data in self.data.values():
+            data[1:] = data[0:-1]
+        self.data["User"][0], self.data["System"][0] = self.cpuStat.statistic()
+        self.data["Total"][0] = self.data["User"][0] + self.data["System"][0]
+        self.data["Idle"][0] = 100.0 - self.data["Total"][0]
+
+        self.timeData += 1.0
+
+        self.setAxisScale(
+            QwtPlot.xBottom, self.timeData[-1], self.timeData[0])
+        for key in self.curves.keys():
+            self.curves[key].setData(self.timeData, self.data[key])
+
+        self.replot()
+
+    def showCurve(self, item, on, index=None):
+        item.setVisible(on)
+        self.legend().legendWidget(item).setChecked(on)
+        self.replot()
+
+    def cpuPlotCurve(self, key):
+        return self.curves[key]
+
+
+def make():
+    demo = QWidget()
+    demo.setWindowTitle('Cpu Plot')
+    
+    plot = CpuPlot(demo)
+    plot.setTitle("History")
+    
+    label = QLabel("Press the legend to en/disable a curve", demo)
+
+    layout = QVBoxLayout(demo)
+    layout.addWidget(plot)
+    layout.addWidget(label)
+
+    demo.resize(600, 400)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/CartesianDemo.py b/examples/CartesianDemo.py
new file mode 100644
index 0000000..4dca04a
--- /dev/null
+++ b/examples/CartesianDemo.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen
+from qwt.qt.QtCore import Qt
+from qwt import QwtPlot, QwtScaleDraw, QwtPlotGrid, QwtPlotCurve, QwtPlotItem
+
+
+class CartesianAxis(QwtPlotItem):
+    """Supports a coordinate system similar to 
+    http://en.wikipedia.org/wiki/Image:Cartesian-coordinate-system.svg"""
+    def __init__(self, masterAxis, slaveAxis):
+        """Valid input values for masterAxis and slaveAxis are QwtPlot.yLeft,
+        QwtPlot.yRight, QwtPlot.xBottom, and QwtPlot.xTop. When masterAxis is
+        an x-axis, slaveAxis must be an y-axis; and vice versa."""
+        QwtPlotItem.__init__(self)
+        self.__axis = masterAxis
+        if masterAxis in (QwtPlot.yLeft, QwtPlot.yRight):
+            self.setAxes(slaveAxis, masterAxis)
+        else:
+            self.setAxes(masterAxis, slaveAxis)
+        self.scaleDraw = QwtScaleDraw()
+        self.scaleDraw.setAlignment((QwtScaleDraw.LeftScale,
+                                     QwtScaleDraw.RightScale,
+                                     QwtScaleDraw.BottomScale,
+                                     QwtScaleDraw.TopScale)[masterAxis])
+
+    def draw(self, painter, xMap, yMap, rect):
+        """Draw an axis on the plot canvas"""
+        xtr = xMap.transform
+        ytr = yMap.transform
+        if self.__axis in (QwtPlot.yLeft, QwtPlot.yRight):
+            self.scaleDraw.move(round(xtr(0.0)), yMap.p2())
+            self.scaleDraw.setLength(yMap.p1()-yMap.p2())
+        elif self.__axis in (QwtPlot.xBottom, QwtPlot.xTop):
+            self.scaleDraw.move(xMap.p1(), round(ytr(0.0)))
+            self.scaleDraw.setLength(xMap.p2()-xMap.p1())
+        self.scaleDraw.setScaleDiv(self.plot().axisScaleDiv(self.__axis))
+        self.scaleDraw.draw(painter, self.plot().palette())
+
+
+class CartesianPlot(QwtPlot):
+    """Creates a coordinate system similar system 
+    http://en.wikipedia.org/wiki/Image:Cartesian-coordinate-system.svg"""
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+        self.setTitle('Cartesian Coordinate System Demo')
+        # create a plot with a white canvas
+        self.setCanvasBackground(Qt.white)
+        # set plot layout
+        self.plotLayout().setCanvasMargin(0)
+        self.plotLayout().setAlignCanvasToScales(True)
+        # attach a grid
+        grid = QwtPlotGrid()
+        grid.attach(self)
+        grid.setPen(QPen(Qt.black, 0, Qt.DotLine))
+        # attach a x-axis
+        xaxis = CartesianAxis(QwtPlot.xBottom, QwtPlot.yLeft)
+        xaxis.attach(self)
+        self.enableAxis(QwtPlot.xBottom, False)
+        # attach a y-axis
+        yaxis = CartesianAxis(QwtPlot.yLeft, QwtPlot.xBottom)
+        yaxis.attach(self)
+        self.enableAxis(QwtPlot.yLeft, False)
+        # calculate 3 NumPy arrays
+        x = np.arange(-2*np.pi, 2*np.pi, 0.01)
+        y = np.pi*np.sin(x)
+        z = 4*np.pi*np.cos(x)*np.cos(x)*np.sin(x)
+        # attach a curve
+        curve = QwtPlotCurve('y = pi*sin(x)')
+        curve.attach(self)
+        curve.setPen(QPen(Qt.green, 2))
+        curve.setData(x, y)
+        # attach another curve
+        curve = QwtPlotCurve('y = 4*pi*sin(x)*cos(x)**2')
+        curve.attach(self)
+        curve.setPen(QPen(Qt.black, 2))
+        curve.setData(x, z)
+        self.replot()
+
+
+def make():
+    demo = CartesianPlot()
+    demo.resize(400, 300)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/CurveDemo1.py b/examples/CurveDemo1.py
new file mode 100644
index 0000000..0e68f32
--- /dev/null
+++ b/examples/CurveDemo1.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import (QApplication, QPen, QBrush, QFrame, QFont, QPainter,
+                          QPaintEngine)
+from qwt.qt.QtCore import QSize
+from qwt.qt.QtCore import Qt
+from qwt import QwtSymbol, QwtPlotCurve, QwtPlotItem, QwtScaleMap
+
+
+class CurveDemo(QFrame):
+    def __init__(self, *args):
+        QFrame.__init__(self, *args)
+
+        self.xMap = QwtScaleMap()
+        self.xMap.setScaleInterval(-0.5, 10.5)
+        self.yMap = QwtScaleMap()
+        self.yMap.setScaleInterval(-1.1, 1.1)
+
+        # frame style
+        self.setFrameStyle(QFrame.Box | QFrame.Raised)
+        self.setLineWidth(2)
+        self.setMidLineWidth(3)
+
+        # calculate values
+        self.x = np.arange(0, 10.0, 10.0/27)
+        self.y = np.sin(self.x)*np.cos(2*self.x)
+        
+        # make curves with different styles
+        self.curves = []
+        self.titles = []
+        # curve 1
+        self.titles.append('Style: Sticks, Symbol: Ellipse')
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(Qt.red))
+        curve.setStyle(QwtPlotCurve.Sticks)
+        curve.setSymbol(QwtSymbol(QwtSymbol.Ellipse,
+                                      QBrush(Qt.yellow),
+                                      QPen(Qt.blue),
+                                      QSize(5, 5)))
+        self.curves.append(curve)
+        # curve 2
+        self.titles.append('Style: Lines, Symbol: None')
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(Qt.darkBlue))
+        curve.setStyle(QwtPlotCurve.Lines)
+        self.curves.append(curve)
+        # curve 3
+        self.titles.append('Style: Lines, Symbol: None, Antialiased')
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(Qt.darkBlue))
+        curve.setStyle(QwtPlotCurve.Lines)
+        curve.setRenderHint(QwtPlotItem.RenderAntialiased)
+        self.curves.append(curve)
+        # curve 4
+        self.titles.append('Style: Steps, Symbol: None')
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(Qt.darkCyan))
+        curve.setStyle(QwtPlotCurve.Steps)
+        self.curves.append(curve)        
+        # curve 5
+        self.titles.append('Style: NoCurve, Symbol: XCross')
+        curve = QwtPlotCurve()
+        curve.setStyle(QwtPlotCurve.NoCurve)
+        curve.setSymbol(QwtSymbol(QwtSymbol.XCross,
+                                      QBrush(),
+                                      QPen(Qt.darkMagenta),
+                                      QSize(5, 5)))
+        self.curves.append(curve)
+
+        # attach data, using Numeric
+        for curve in self.curves:
+            curve.setData(self.x, self.y)
+
+    def shiftDown(self, rect, offset):
+        rect.translate(0, offset)
+
+    def paintEvent(self, event):
+        QFrame.paintEvent(self, event)
+        painter = QPainter(self)
+        painter.setClipRect(self.contentsRect())
+        self.drawContents(painter)
+
+    def drawContents(self, painter):
+        # draw curves
+        r = self.contentsRect()
+        dy = r.height()/len(self.curves)
+        r.setHeight(dy)
+        for curve in self.curves:
+            self.xMap.setPaintInterval(r.left(), r.right())
+            self.yMap.setPaintInterval(r.top(), r.bottom())
+            engine = painter.device().paintEngine()
+            if engine is not None and engine.hasFeature(QPaintEngine.Antialiasing):
+                painter.setRenderHint(
+                    QPainter.Antialiasing,
+                    curve.testRenderHint(QwtPlotItem.RenderAntialiased))
+            curve.draw(painter, self.xMap, self.yMap, r)
+            self.shiftDown(r, dy)
+        # draw titles
+        r = self.contentsRect()
+        r.setHeight(dy)
+        painter.setFont(QFont('Helvetica', 8))
+        painter.setPen(Qt.black)
+        for title in self.titles:
+            painter.drawText(
+                0, r.top(), r.width(), painter.fontMetrics().height(),
+                Qt.AlignTop | Qt.AlignHCenter, title)
+            self.shiftDown(r, dy)
+
+
+def make():
+    demo = CurveDemo()
+    demo.resize(300, 600)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/CurveDemo2.py b/examples/CurveDemo2.py
new file mode 100644
index 0000000..abd4a81
--- /dev/null
+++ b/examples/CurveDemo2.py
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+
+#FIXME: scale issue!
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import (QApplication, QPen, QBrush, QFrame, QColor, QPainter,
+                          QPalette)
+from qwt.qt.QtCore import QSize
+from qwt.qt.QtCore import Qt
+from qwt import QwtScaleMap, QwtSymbol, QwtPlotCurve
+
+Size = 15
+USize = 13
+
+class CurveDemo(QFrame):
+
+    def __init__(self, *args):
+        QFrame.__init__(self, *args)
+
+        self.setFrameStyle(QFrame.Box | QFrame.Raised)
+        self.setLineWidth(2)
+        self.setMidLineWidth(3)
+
+        p = QPalette()
+        p.setColor(self.backgroundRole(), QColor(30, 30, 50))
+        self.setPalette(p)
+        # make curves and maps
+        self.tuples = []
+        # curve 1
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(QColor(150, 150, 200), 2))
+        curve.setStyle(QwtPlotCurve.Lines)
+        curve.setSymbol(QwtSymbol(QwtSymbol.XCross,
+                                      QBrush(),
+                                      QPen(Qt.yellow, 2),
+                                      QSize(7, 7)))
+        self.tuples.append((curve,
+                            QwtScaleMap(0, 100, -1.5, 1.5),
+                            QwtScaleMap(0, 100, 0.0, 2*np.pi)))
+        # curve 2
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(QColor(200, 150, 50),
+                                1,
+                                Qt.DashDotDotLine))
+        curve.setStyle(QwtPlotCurve.Sticks)
+        curve.setSymbol(QwtSymbol(QwtSymbol.Ellipse,
+                                      QBrush(Qt.blue),
+                                      QPen(Qt.yellow),
+                                      QSize(5, 5)))
+        self.tuples.append((curve,
+                            QwtScaleMap(0, 100, 0.0, 2*np.pi),
+                            QwtScaleMap(0, 100, -3.0, 1.1)))
+        # curve 3
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(QColor(100, 200, 150)))
+        curve.setStyle(QwtPlotCurve.Lines)
+        self.tuples.append((curve,
+                            QwtScaleMap(0, 100, -1.1, 3.0),
+                            QwtScaleMap(0, 100, -1.1, 3.0)))
+        # curve 4
+        curve = QwtPlotCurve()
+        curve.setPen(QPen(Qt.red))
+        curve.setStyle(QwtPlotCurve.Lines)
+        self.tuples.append((curve,
+                            QwtScaleMap(0, 100, -5.0, 1.1),
+                            QwtScaleMap(0, 100, -1.1, 5.0)))
+        # data
+        self.phase = 0.0
+        self.base = np.arange(0.0, 2.01*np.pi, 2*np.pi/(USize-1))
+        self.uval = np.cos(self.base)
+        self.vval = np.sin(self.base)
+        self.uval[1::2] *= 0.5
+        self.vval[1::2] *= 0.5
+        self.newValues()
+        # start timer
+        self.tid = self.startTimer(250)
+
+    def paintEvent(self, event):
+        QFrame.paintEvent(self,event)
+        painter = QPainter(self)
+        painter.setClipRect(self.contentsRect())
+        self.drawContents(painter)
+
+    def drawContents(self, painter):
+        r = self.contentsRect()
+        for curve, xMap, yMap in self.tuples:
+            xMap.setPaintInterval(r.left(), r.right())
+            yMap.setPaintInterval(r.top(), r.bottom())
+            curve.draw(painter, xMap, yMap, r)
+
+    def timerEvent(self, event):
+        self.newValues()
+        self.repaint()
+        
+    def newValues(self):
+        phase = self.phase
+        
+        self.xval = np.arange(0, 2.01*np.pi, 2*np.pi/(Size-1))
+        self.yval = np.sin(self.xval - phase)
+        self.zval = np.cos(3*(self.xval + phase))
+    
+        s = 0.25 * np.sin(phase)
+        c = np.sqrt(1.0 - s*s)
+        u = self.uval
+        self.uval = c*self.uval-s*self.vval
+        self.vval = c*self.vval+s*u
+
+        self.tuples[0][0].setData(self.yval, self.xval)
+        self.tuples[1][0].setData(self.xval, self.zval)
+        self.tuples[2][0].setData(self.yval, self.zval)
+        self.tuples[3][0].setData(self.uval, self.vval)
+        
+        self.phase += 2*np.pi/100
+        if self.phase>2*np.pi:
+            self.phase = 0.0
+
+
+def make():
+    demo = CurveDemo()
+    demo.resize(600, 600)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
\ No newline at end of file
diff --git a/examples/DataDemo.py b/examples/DataDemo.py
new file mode 100644
index 0000000..a6fe9db
--- /dev/null
+++ b/examples/DataDemo.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+
+import random
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen, QBrush, QFrame
+from qwt.qt.QtCore import QSize
+from qwt.qt.QtCore import Qt
+from qwt import (QwtPlot, QwtPlotMarker, QwtSymbol, QwtLegend, QwtPlotCurve,
+                 QwtAbstractScaleDraw)
+
+
+class DataPlot(QwtPlot):
+
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+
+        self.setCanvasBackground(Qt.white)
+        self.alignScales()
+
+        # Initialize data
+        self.x = np.arange(0.0, 100.1, 0.5)
+        self.y = np.zeros(len(self.x), np.float)
+        self.z = np.zeros(len(self.x), np.float)
+
+        self.setTitle("A Moving QwtPlot Demonstration")
+        self.insertLegend(QwtLegend(), QwtPlot.BottomLegend);
+
+        self.curveR = QwtPlotCurve("Data Moving Right")
+        self.curveR.attach(self)
+        self.curveL = QwtPlotCurve("Data Moving Left")
+        self.curveL.attach(self)
+
+        self.curveL.setSymbol(QwtSymbol(QwtSymbol.Ellipse,
+                                        QBrush(),
+                                        QPen(Qt.yellow),
+                                        QSize(7, 7)))
+
+        self.curveR.setPen(QPen(Qt.red))
+        self.curveL.setPen(QPen(Qt.blue))
+
+        mY = QwtPlotMarker()
+        mY.setLabelAlignment(Qt.AlignRight | Qt.AlignTop)
+        mY.setLineStyle(QwtPlotMarker.HLine)
+        mY.setYValue(0.0)
+        mY.attach(self)
+
+        self.setAxisTitle(QwtPlot.xBottom, "Time (seconds)")
+        self.setAxisTitle(QwtPlot.yLeft, "Values")
+    
+        self.startTimer(50)
+        self.phase = 0.0
+
+    def alignScales(self):
+        self.canvas().setFrameStyle(QFrame.Box | QFrame.Plain)
+        self.canvas().setLineWidth(1)
+        for i in range(QwtPlot.axisCnt):
+            scaleWidget = self.axisWidget(i)
+            if scaleWidget:
+                scaleWidget.setMargin(0)
+            scaleDraw = self.axisScaleDraw(i)
+            if scaleDraw:
+                scaleDraw.enableComponent(QwtAbstractScaleDraw.Backbone, False)
+    
+    def timerEvent(self, e):
+        if self.phase > np.pi - 0.0001:
+            self.phase = 0.0
+
+        # y moves from left to right:
+        # shift y array right and assign new value y[0]
+        self.y = np.concatenate((self.y[:1], self.y[:-1]), 1)
+        self.y[0] = np.sin(self.phase) * (-1.0 + 2.0*random.random())
+		
+        # z moves from right to left:
+        # Shift z array left and assign new value to z[n-1].
+        self.z = np.concatenate((self.z[1:], self.z[:1]), 1)
+        self.z[-1] = 0.8 - (2.0 * self.phase/np.pi) + 0.4*random.random()
+
+        self.curveR.setData(self.x, self.y)
+        self.curveL.setData(self.x, self.z)
+
+        self.replot()
+        self.phase += np.pi*0.02
+
+
+def make():
+    demo = DataPlot()
+    demo.resize(500, 300)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/ErrorBarDemo.py b/examples/ErrorBarDemo.py
new file mode 100644
index 0000000..535c7d1
--- /dev/null
+++ b/examples/ErrorBarDemo.py
@@ -0,0 +1,281 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen, QBrush
+from qwt.qt.QtCore import QSize, QRectF, QLineF
+from qwt.qt.QtCore import Qt
+from qwt import QwtPlot, QwtSymbol, QwtPlotGrid, QwtPlotCurve, QwtText
+
+
+class ErrorBarPlotCurve(QwtPlotCurve):
+    def __init__(self, x=[], y=[], dx=None, dy=None, curvePen=None,
+                 curveStyle=None, curveSymbol=None, errorPen=None,
+                 errorCap=0, errorOnTop=False):
+        """A curve of x versus y data with error bars in dx and dy.
+
+        Horizontal error bars are plotted if dx is not None.
+        Vertical error bars are plotted if dy is not None.
+
+        x and y must be sequences with a shape (N,) and dx and dy must be
+        sequences (if not None) with a shape (), (N,), or (2, N):
+        - if dx or dy has a shape () or (N,), the error bars are given by
+          (x-dx, x+dx) or (y-dy, y+dy),
+        - if dx or dy has a shape (2, N), the error bars are given by
+          (x-dx[0], x+dx[1]) or (y-dy[0], y+dy[1]).
+
+        curvePen is the pen used to plot the curve
+        
+        curveStyle is the style used to plot the curve
+        
+        curveSymbol is the symbol used to plot the symbols
+        
+        errorPen is the pen used to plot the error bars
+        
+        errorCap is the size of the error bar caps
+        
+        errorOnTop is a boolean:
+        - if True, plot the error bars on top of the curve,
+        - if False, plot the curve on top of the error bars.
+        """
+
+        QwtPlotCurve.__init__(self)
+        
+        if curvePen is None:
+            curvePen = QPen(Qt.NoPen)
+        if curveStyle is None:
+            curveStyle = QwtPlotCurve.Lines
+        if curveSymbol is None:
+            curveSymbol = QwtSymbol()
+        if errorPen is None:
+            errorPen = QPen(Qt.NoPen)
+        
+        self.setData(x, y, dx, dy)
+        self.setPen(curvePen)
+        self.setStyle(curveStyle)
+        self.setSymbol(curveSymbol)
+        self.errorPen = errorPen
+        self.errorCap = errorCap
+        self.errorOnTop = errorOnTop
+
+    def setData(self, *args):
+        """Set x versus y data with error bars in dx and dy.
+
+        Horizontal error bars are plotted if dx is not None.
+        Vertical error bars are plotted if dy is not None.
+
+        x and y must be sequences with a shape (N,) and dx and dy must be
+        sequences (if not None) with a shape (), (N,), or (2, N):
+        - if dx or dy has a shape () or (N,), the error bars are given by
+          (x-dx, x+dx) or (y-dy, y+dy),
+        - if dx or dy has a shape (2, N), the error bars are given by
+          (x-dx[0], x+dx[1]) or (y-dy[0], y+dy[1]).
+        """
+        if len(args) == 1:
+            QwtPlotCurve.setData(self, *args)
+            return
+            
+        dx = None
+        dy = None
+        x, y = args[:2]
+        if len(args) > 2:
+            dx = args[2]
+            if len(args) > 3:
+                dy = args[3]
+        
+        self.__x = np.asarray(x, np.float)
+        if len(self.__x.shape) != 1:
+            raise RuntimeError('len(asarray(x).shape) != 1')
+
+        self.__y = np.asarray(y, np.float)
+        if len(self.__y.shape) != 1:
+            raise RuntimeError('len(asarray(y).shape) != 1')
+        if len(self.__x) != len(self.__y):
+            raise RuntimeError('len(asarray(x)) != len(asarray(y))')
+
+        if dx is None:
+            self.__dx = None
+        else:
+            self.__dx = np.asarray(dx, np.float)
+        if len(self.__dx.shape) not in [0, 1, 2]:
+            raise RuntimeError('len(asarray(dx).shape) not in [0, 1, 2]')
+            
+        if dy is None:
+            self.__dy = dy
+        else:
+            self.__dy = np.asarray(dy, np.float)
+        if len(self.__dy.shape) not in [0, 1, 2]:
+            raise RuntimeError('len(asarray(dy).shape) not in [0, 1, 2]')
+        
+        QwtPlotCurve.setData(self, self.__x, self.__y)
+        
+    def boundingRect(self):
+        """Return the bounding rectangle of the data, error bars included.
+        """
+        if self.__dx is None:
+            xmin = min(self.__x)
+            xmax = max(self.__x)
+        elif len(self.__dx.shape) in [0, 1]:
+            xmin = min(self.__x - self.__dx)
+            xmax = max(self.__x + self.__dx)
+        else:
+            xmin = min(self.__x - self.__dx[0])
+            xmax = max(self.__x + self.__dx[1])
+
+        if self.__dy is None:
+            ymin = min(self.__y)
+            ymax = max(self.__y)
+        elif len(self.__dy.shape) in [0, 1]:
+            ymin = min(self.__y - self.__dy)
+            ymax = max(self.__y + self.__dy)
+        else:
+            ymin = min(self.__y - self.__dy[0])
+            ymax = max(self.__y + self.__dy[1])
+
+        return QRectF(xmin, ymin, xmax-xmin, ymax-ymin)
+
+    def drawSeries(self, painter, xMap, yMap, canvasRect, first, last = -1):
+        """Draw an interval of the curve, including the error bars
+
+        painter is the QPainter used to draw the curve
+
+        xMap is the QwtDiMap used to map x-values to pixels
+
+        yMap is the QwtDiMap used to map y-values to pixels
+        
+        first is the index of the first data point to draw
+
+        last is the index of the last data point to draw. If last < 0, last
+        is transformed to index the last data point
+        """
+
+        if last < 0:
+            last = self.dataSize() - 1
+
+        if self.errorOnTop:
+            QwtPlotCurve.drawSeries(self, painter, xMap, yMap,
+                                        canvasRect, first, last)
+
+        # draw the error bars
+        painter.save()
+        painter.setPen(self.errorPen)
+
+        # draw the error bars with caps in the x direction
+        if self.__dx is not None:
+            # draw the bars
+            if len(self.__dx.shape) in [0, 1]:
+                xmin = (self.__x - self.__dx)
+                xmax = (self.__x + self.__dx)
+            else:
+                xmin = (self.__x - self.__dx[0])
+                xmax = (self.__x + self.__dx[1])
+            y = self.__y
+            n, i = len(y), 0
+            lines = []
+            while i < n:
+                yi = yMap.transform(y[i])
+                lines.append(QLineF(xMap.transform(xmin[i]), yi,
+                                          xMap.transform(xmax[i]), yi))
+                i += 1
+            painter.drawLines(lines)
+            if self.errorCap > 0:
+                # draw the caps
+                cap = self.errorCap/2
+                n, i, = len(y), 0
+                lines = []
+                while i < n:
+                    yi = yMap.transform(y[i])
+                    lines.append(
+                        QLineF(xMap.transform(xmin[i]), yi - cap,
+                                     xMap.transform(xmin[i]), yi + cap))
+                    lines.append(
+                        QLineF(xMap.transform(xmax[i]), yi - cap,
+                                     xMap.transform(xmax[i]), yi + cap))
+                    i += 1
+            painter.drawLines(lines)
+
+        # draw the error bars with caps in the y direction
+        if self.__dy is not None:
+            # draw the bars
+            if len(self.__dy.shape) in [0, 1]:
+                ymin = (self.__y - self.__dy)
+                ymax = (self.__y + self.__dy)
+            else:
+                ymin = (self.__y - self.__dy[0])
+                ymax = (self.__y + self.__dy[1])
+            x = self.__x
+            n, i, = len(x), 0
+            lines = []
+            while i < n:
+                xi = xMap.transform(x[i])
+                lines.append(
+                    QLineF(xi, yMap.transform(ymin[i]),
+                                 xi, yMap.transform(ymax[i])))
+                i += 1
+            painter.drawLines(lines)
+            # draw the caps
+            if self.errorCap > 0:
+                cap = self.errorCap/2
+                n, i, j = len(x), 0, 0
+                lines = []
+                while i < n:
+                    xi = xMap.transform(x[i])
+                    lines.append(
+                        QLineF(xi - cap, yMap.transform(ymin[i]),
+                                     xi + cap, yMap.transform(ymin[i])))
+                    lines.append(
+                        QLineF(xi - cap, yMap.transform(ymax[i]),
+                                     xi + cap, yMap.transform(ymax[i])))
+                    i += 1
+            painter.drawLines(lines)
+
+        painter.restore()
+
+        if not self.errorOnTop:
+            QwtPlotCurve.drawSeries(self, painter, xMap, yMap,
+                                        canvasRect, first, last)
+
+
+def make():
+    # create a plot with a white canvas
+    demo = QwtPlot(QwtText("Errorbar Demonstation"))
+    demo.setCanvasBackground(Qt.white)
+    demo.plotLayout().setAlignCanvasToScales(True)
+
+    grid = QwtPlotGrid()
+    grid.attach(demo)
+    grid.setPen(QPen(Qt.black, 0, Qt.DotLine))
+    
+    # calculate data and errors for a curve with error bars
+    x = np.arange(0, 10.1, 0.5, np.float)
+    y = np.sin(x)
+    dy = 0.2 * abs(y)
+    # dy = (0.15 * abs(y), 0.25 * abs(y)) # uncomment for asymmetric error bars
+    dx = 0.2 # all error bars the same size
+    errorOnTop = False # uncomment to draw the curve on top of the error bars
+    # errorOnTop = True # uncomment to draw the error bars on top of the curve
+    curve = ErrorBarPlotCurve(
+        x = x,
+        y = y,
+        dx = dx,
+        dy = dy,
+        curvePen = QPen(Qt.black, 2),
+        curveSymbol = QwtSymbol(QwtSymbol.Ellipse,
+                                    QBrush(Qt.red),
+                                    QPen(Qt.black, 2),
+                                    QSize(9, 9)),
+        errorPen = QPen(Qt.blue, 2),
+        errorCap = 10,
+        errorOnTop = errorOnTop,
+        )
+    curve.attach(demo)
+    demo.resize(640, 480)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/EventFilterDemo.py b/examples/EventFilterDemo.py
new file mode 100644
index 0000000..3bbed1d
--- /dev/null
+++ b/examples/EventFilterDemo.py
@@ -0,0 +1,451 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import (QApplication, QPen, QBrush, QColor, QWidget,
+                          QMainWindow, QPainter, QPixmap, QToolBar, QWhatsThis)
+from qwt.qt.QtCore import QSize, QEvent, Signal, QRect, QObject, Qt, QPoint
+from qwt.qt import PYQT5
+from qwt import (QwtPlot, QwtScaleDraw, QwtSymbol, QwtPlotGrid, QwtPlotCurve,
+                 QwtPlotCanvas, QwtScaleDiv)
+
+
+class ColorBar(QWidget):
+    SIG_COLOR_SELECTED = Signal(QColor)
+    
+    def __init__(self, orientation, *args):
+        QWidget.__init__(self, *args)
+        self.__orientation = orientation
+        self.__light = QColor(Qt.white)
+        self.__dark = QColor(Qt.black)
+        self.setCursor(Qt.PointingHandCursor)
+    
+    def setOrientation(self, orientation):
+        self.__orientation = orientation
+        self.update()
+    
+    def orientation(self):
+        return self.__orientation
+    
+    def setRange(self, light, dark):
+        self.__light = light
+        self.__dark = dark
+        self.update()
+    
+    def setLight(self, color):
+        self.__light = color
+        self.update()
+    
+    def setDark(self, color):
+        self.__dark = color
+        self.update()
+    
+    def light(self):
+        return self.__light
+    
+    def dark(self):
+        return self.__dark
+    
+    def mousePressEvent(self, event):
+        if event.button() == Qt.LeftButton:
+            if PYQT5:
+                pm = self.grab()
+            else:
+                pm = QPixmap.grabWidget(self)
+            color = QColor()
+            color.setRgb(pm.toImage().pixel(event.x(), event.y()))
+            self.SIG_COLOR_SELECTED.emit(color)
+            event.accept()
+
+    def paintEvent(self, _):
+        painter = QPainter(self)
+        self.drawColorBar(painter, self.rect())
+
+    def drawColorBar(self, painter, rect):
+        h1, s1, v1, _ = self.__light.getHsv()
+        h2, s2, v2, _ = self.__dark.getHsv()
+        painter.save()
+        painter.setClipRect(rect)
+        painter.setClipping(True)
+        painter.fillRect(rect, QBrush(self.__dark))
+        sectionSize = 2
+        if (self.__orientation == Qt.Horizontal):
+            numIntervals = rect.width()/sectionSize
+        else:
+            numIntervals = rect.height()/sectionSize
+        section = QRect()
+        for i in range(int(numIntervals)):
+            if self.__orientation == Qt.Horizontal:
+                section.setRect(rect.x() + i*sectionSize, rect.y(),
+                                sectionSize, rect.heigh())
+            else:
+                section.setRect(rect.x(), rect.y() + i*sectionSize,
+                                rect.width(), sectionSize)
+            ratio = float(i)/float(numIntervals)
+            color = QColor()
+            color.setHsv(h1 + int(ratio*(h2-h1) + 0.5),
+                         s1 + int(ratio*(s2-s1) + 0.5),
+                         v1 + int(ratio*(v2-v1) + 0.5))            
+            painter.fillRect(section, color)
+        painter.restore()
+
+
+class Plot(QwtPlot):
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+
+        self.setTitle("Interactive Plot")
+        
+        self.setCanvasColor(Qt.darkCyan)
+
+        grid = QwtPlotGrid()
+        grid.attach(self)
+        grid.setMajorPen(QPen(Qt.white, 0, Qt.DotLine))
+        
+        self.setAxisScale(QwtPlot.xBottom, 0.0, 100.0)
+        self.setAxisScale(QwtPlot.yLeft, 0.0, 100.0)
+
+        # Avoid jumping when label with 3 digits
+        # appear/disappear when scrolling vertically
+        scaleDraw = self.axisScaleDraw(QwtPlot.yLeft)
+        scaleDraw.setMinimumExtent(scaleDraw.extent(
+            self.axisWidget(QwtPlot.yLeft).font()))
+
+        self.plotLayout().setAlignCanvasToScales(True)
+
+        self.__insertCurve(Qt.Vertical, Qt.blue, 30.0)
+        self.__insertCurve(Qt.Vertical, Qt.magenta, 70.0)
+        self.__insertCurve(Qt.Horizontal, Qt.yellow, 30.0)
+        self.__insertCurve(Qt.Horizontal, Qt.white, 70.0)
+        
+        self.replot()
+
+        scaleWidget = self.axisWidget(QwtPlot.yLeft)
+        scaleWidget.setMargin(10)
+
+        self.__colorBar = ColorBar(Qt.Vertical, scaleWidget)
+        self.__colorBar.setRange(
+            QColor(Qt.red), QColor(Qt.darkBlue))
+        self.__colorBar.setFocusPolicy(Qt.TabFocus)
+        self.__colorBar.SIG_COLOR_SELECTED.connect(self.setCanvasColor)
+        
+        # we need the resize events, to lay out the color bar
+        scaleWidget.installEventFilter(self)
+
+        # we need the resize events, to lay out the wheel
+        self.canvas().installEventFilter(self)
+
+        scaleWidget.setWhatsThis(
+            'Selecting a value at the scale will insert a new curve.')
+        self.__colorBar.setWhatsThis(
+            'Selecting a color will change the background of the plot.')
+        self.axisWidget(QwtPlot.xBottom).setWhatsThis(
+            'Selecting a value at the scale will insert a new curve.')
+    
+    def setCanvasColor(self, color):
+        self.setCanvasBackground(color)
+        self.replot()
+
+    def scrollLeftAxis(self, value):
+        self.setAxisScale(QwtPlot.yLeft, value, value + 100)
+        self.replot()
+
+    def eventFilter(self, object, event):
+        if event.type() == QEvent.Resize:
+            size = event.size()
+            if object == self.axisWidget(QwtPlot.yLeft):
+                margin = 2
+                x = size.width() - object.margin() + margin
+                w = object.margin() - 2 * margin
+                y = object.startBorderDist()
+                h = (size.height()
+                     - object.startBorderDist() - object.endBorderDist())
+                self.__colorBar.setGeometry(x, y, w, h)
+        return QwtPlot.eventFilter(self, object, event)
+
+    def insertCurve(self, axis, base):
+        if axis == QwtPlot.yLeft or axis == QwtPlot.yRight:
+            o = Qt.Horizontal
+        else:
+            o = Qt.Vertical
+        self.__insertCurve(o, QColor(Qt.red), base)
+        self.replot()
+
+    def __insertCurve(self, orientation, color, base):
+        curve = QwtPlotCurve()
+        curve.attach(self)
+        curve.setPen(QPen(color))
+        curve.setSymbol(QwtSymbol(QwtSymbol.Ellipse,
+                                      QBrush(Qt.gray),
+                                      QPen(color),
+                                      QSize(8, 8)))
+        fixed = base*np.ones(10, np.float)
+        changing = np.arange(0, 95.0, 10.0, np.float) + 5.0
+        if orientation == Qt.Horizontal:
+            curve.setData(changing, fixed)
+        else:
+            curve.setData(fixed, changing)
+
+
+class CanvasPicker(QObject):
+    def __init__(self, plot):
+        QObject.__init__(self, plot)
+        self.__selectedCurve = None
+        self.__selectedPoint = -1
+        self.__plot = plot
+        canvas = plot.canvas()
+        canvas.installEventFilter(self)        
+        # We want the focus, but no focus rect.
+        # The selected point will be highlighted instead.
+        canvas.setFocusPolicy(Qt.StrongFocus)
+        canvas.setCursor(Qt.PointingHandCursor)
+        canvas.setFocusIndicator(QwtPlotCanvas.ItemFocusIndicator)
+        canvas.setFocus()        
+        canvas.setWhatsThis(
+            'All points can be moved using the left mouse button '
+            'or with these keys:\n\n'
+            '- Up: Select next curve\n'
+            '- Down: Select previous curve\n'
+            '- Left, "-": Select next point\n'
+            '- Right, "+": Select previous point\n'
+            '- 7, 8, 9, 4, 6, 1, 2, 3: Move selected point'
+            )
+        self.__shiftCurveCursor(True)
+
+    def event(self, event):
+        if event.type() == QEvent.User:
+            self.__showCursor(True)
+            return True
+        return QObject.event(self, event)
+    
+    def eventFilter(self, object, event):
+        if event.type() == QEvent.FocusIn:
+            self.__showCursor(True)
+        if event.type() == QEvent.FocusOut:
+            self.__showCursor(False)
+        if event.type() == QEvent.Paint:
+            QApplication.postEvent(self, QEvent(QEvent.User))
+        elif event.type() == QEvent.MouseButtonPress:
+            self.__select(event.pos())
+            return True
+        elif event.type() == QEvent.MouseMove:
+            self.__move(event.pos())
+            return True
+        if event.type() == QEvent.KeyPress:
+            delta = 5
+            key = event.key()
+            if key == Qt.Key_Up:
+                self.__shiftCurveCursor(True)
+                return True
+            elif key == Qt.Key_Down:
+                self.__shiftCurveCursor(False)
+                return True
+            elif key == Qt.Key_Right or key == Qt.Key_Plus:
+                if self.__selectedCurve:
+                    self.__shiftPointCursor(True)
+                else:
+                    self.__shiftCurveCursor(True)
+                return True
+            elif key == Qt.Key_Left or key == Qt.Key_Minus:
+                if self.__selectedCurve:
+                    self.__shiftPointCursor(False)
+                else:
+                    self.__shiftCurveCursor(True)
+                return True
+            if key == Qt.Key_1:
+                self.__moveBy(-delta, delta)
+            elif key == Qt.Key_2:
+                self.__moveBy(0, delta)
+            elif key == Qt.Key_3:
+                self.__moveBy(delta, delta)
+            elif key == Qt.Key_4:
+                self.__moveBy(-delta, 0)
+            elif key == Qt.Key_6:
+                self.__moveBy(delta, 0)
+            elif key == Qt.Key_7:
+                self.__moveBy(-delta, -delta)
+            elif key == Qt.Key_8:
+                self.__moveBy(0, -delta)
+            elif key == Qt.Key_9:
+                self.__moveBy(delta, -delta)
+        return QwtPlot.eventFilter(self.__plot, object, event)
+
+    def __select(self, pos):
+        found, distance, point = None, 1e100, -1
+        for curve in self.__plot.itemList():
+            if isinstance(curve, QwtPlotCurve):
+                i, d = curve.closestPoint(pos)
+                if d < distance:
+                    found = curve
+                    point = i
+                    distance = d
+        self.__showCursor(False)
+        self.__selectedCurve = None
+        self.__selectedPoint = -1
+        if found and distance < 10:
+            self.__selectedCurve = found
+            self.__selectedPoint = point
+            self.__showCursor(True)
+
+    def __moveBy(self, dx, dy):
+        if dx == 0 and dy == 0:
+            return
+        curve = self.__selectedCurve
+        if not curve:
+            return
+        s = curve.sample(self.__selectedPoint)
+        x = self.__plot.transform(curve.xAxis(), s.x()) + dx
+        y = self.__plot.transform(curve.yAxis(), s.y()) + dy
+        self.__move(QPoint(x, y))
+
+    def __move(self, pos):
+        curve = self.__selectedCurve
+        if not curve:
+            return
+        xData = np.zeros(curve.dataSize(), np.float)
+        yData = np.zeros(curve.dataSize(), np.float)
+        for i in range(curve.dataSize()):
+            if i == self.__selectedPoint:
+                xData[i] = self.__plot.invTransform(curve.xAxis(), pos.x())
+                yData[i] = self.__plot.invTransform(curve.yAxis(), pos.y())
+            else:
+                s = curve.sample(i)
+                xData[i] = s.x()
+                yData[i] = s.y()            
+        curve.setData(xData, yData)
+        self.__showCursor(True)
+        self.__plot.replot()
+
+    def __showCursor(self, showIt):
+        curve = self.__selectedCurve
+        if not curve:
+            return
+        symbol = curve.symbol()
+        brush = symbol.brush()
+        if showIt:
+            symbol.setBrush(symbol.brush().color().darker(180))
+        curve.directPaint(self.__selectedPoint, self.__selectedPoint)
+        if showIt:
+            symbol.setBrush(brush)
+    
+    def __shiftCurveCursor(self, up):
+        curves = [curve for curve in self.__plot.itemList()
+                  if isinstance(curve, QwtPlotCurve)]
+        if not curves:
+            return
+        if self.__selectedCurve in curves:
+            index = curves.index(self.__selectedCurve)
+            if up:
+                index += 1
+            else:
+                index -= 1
+            # keep index within [0, len(curves))
+            index += len(curves)
+            index %= len(curves)
+        else:
+            index = 0
+        self.__showCursor(False)
+        self.__selectedPoint = 0
+        self.__selectedCurve = curves[index]
+        self.__showCursor(True)
+
+    def __shiftPointCursor(self, up):
+        curve = self.__selectedCurve
+        if not curve:
+            return
+        if up:
+            index = self.__selectedPoint + 1
+        else:
+            index = self.__selectedPoint - 1
+        # keep index within [0, curve.dataSize())
+        index += curve.dataSize()
+        index %= curve.dataSize()
+        if index != self.__selectedPoint:
+            self.__showCursor(False)
+            self.__selectedPoint = index
+            self.__showCursor(True)
+
+
+class ScalePicker(QObject):
+    SIG_CLICKED = Signal(int, float)
+    
+    def __init__(self, plot):
+        QObject.__init__(self, plot)
+        for i in range(QwtPlot.axisCnt):
+            scaleWidget = plot.axisWidget(i)
+            if scaleWidget:
+                scaleWidget.installEventFilter(self)
+
+    def eventFilter(self, object, event):
+        if (event.type() == QEvent.MouseButtonPress):
+            self.__mouseClicked(object, event.pos())
+            return True
+        return QObject.eventFilter(self, object, event)
+
+    def __mouseClicked(self, scale, pos):
+        rect = self.__scaleRect(scale)
+        margin = 10
+        rect.setRect(rect.x() - margin, rect.y() - margin,
+                     rect.width() + 2 * margin, rect.height() +  2 * margin)
+        if rect.contains(pos):
+            value = 0.0
+            axis = -1
+        sd = scale.scaleDraw()
+        if scale.alignment() == QwtScaleDraw.LeftScale:
+            value = sd.scaleMap().invTransform(pos.y())
+            axis = QwtPlot.yLeft
+        elif scale.alignment() == QwtScaleDraw.RightScale:
+            value = sd.scaleMap().invTransform(pos.y())
+            axis = QwtPlot.yRight
+        elif scale.alignment() == QwtScaleDraw.BottomScale:
+            value = sd.scaleMap().invTransform(pos.x())
+            axis = QwtPlot.xBottom
+        elif scale.alignment() == QwtScaleDraw.TopScale:
+            value = sd.scaleMap().invTransform(pos.x())
+            axis = QwtPlot.xBottom
+        self.SIG_CLICKED.emit(axis, value)
+ 
+    def __scaleRect(self, scale):
+        bld = scale.margin()
+        mjt = scale.scaleDraw().tickLength(QwtScaleDiv.MajorTick)
+        sbd = scale.startBorderDist()
+        ebd = scale.endBorderDist()
+        if scale.alignment() == QwtScaleDraw.LeftScale:
+            return QRect(scale.width() - bld - mjt, sbd,
+                                mjt, scale.height() - sbd - ebd)
+        elif scale.alignment() == QwtScaleDraw.RightScale: 
+            return QRect(bld, sbd,mjt, scale.height() - sbd - ebd)
+        elif scale.alignment() == QwtScaleDraw.BottomScale:
+            return QRect(sbd, bld, scale.width() - sbd - ebd, mjt)
+        elif scale.alignment() == QwtScaleDraw.TopScale:
+            return QRect(sbd, scale.height() - bld - mjt,
+                                scale.width() - sbd - ebd, mjt)
+        else:
+            return QRect()
+
+
+def make():
+    demo = QMainWindow()
+    toolBar = QToolBar(demo)
+    toolBar.addAction(QWhatsThis.createAction(toolBar))
+    demo.addToolBar(toolBar)
+    plot = Plot(demo)
+    demo.setCentralWidget(plot)
+    plot.setWhatsThis(
+        'An useless plot to demonstrate how to use event filtering.\n\n'
+        'You can click on the color bar, the scales or move the slider.\n'
+        'All points can be moved using the mouse or the keyboard.'
+        )
+    CanvasPicker(plot)
+    scalePicker = ScalePicker(plot)
+    scalePicker.SIG_CLICKED.connect(plot.insertCurve)
+    demo.resize(540, 400)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/HistogramDemo.py b/examples/HistogramDemo.py
new file mode 100644
index 0000000..523f4fd
--- /dev/null
+++ b/examples/HistogramDemo.py
@@ -0,0 +1,214 @@
+#!/usr/bin/env python
+
+import random
+import sys
+
+from qwt.qt.QtGui import QApplication, QPen, QColor
+from qwt.qt.QtCore import QRect
+from qwt.qt.QtCore import Qt
+from qwt import (QwtPlot, QwtIntervalSample, QwtInterval, QwtPlotGrid,
+                 QwtPlotItem, QwtPainter, QwtIntervalSeriesData)
+
+
+class HistogramItem(QwtPlotItem):
+    Auto = 0
+    Xfy = 1
+    def __init__(self, *args):
+        QwtPlotItem.__init__(self, *args)
+        self.__attributes = HistogramItem.Auto
+        self.__data = QwtIntervalSeriesData()
+        self.__color = QColor()
+        self.__reference = 0.0
+        self.setItemAttribute(QwtPlotItem.AutoScale, True)
+        self.setItemAttribute(QwtPlotItem.Legend, True)
+        self.setZ(20.0)
+
+    def setData(self, data):
+        self.__data = data
+        self.itemChanged()
+
+    def data(self):
+        return self.__data
+
+    def setColor(self, color):
+        if self.__color != color:
+            self.__color = color
+            self.itemChanged()
+
+    def color(self):
+        return self.__color
+
+    def boundingRect(self):
+        result = self.__data.boundingRect()
+        if not result.isValid():
+            return result
+        if self.testHistogramAttribute(HistogramItem.Xfy):
+            result = QwtDoubleRect(result.y(), result.x(),
+                                       result.height(), result.width())
+            if result.left() > self.baseline():
+                result.setLeft(self.baseline())
+            elif result.right() < self.baseline():
+                result.setRight(self.baseline())
+        else:
+            if result.bottom() < self.baseline():
+                result.setBottom(self.baseline())
+            elif result.top() > self.baseline():
+                result.setTop(self.baseline())
+        return result
+
+    def rtti(self):
+        return QwtPlotItem.PlotHistogram
+
+    def draw(self, painter, xMap, yMap, rect):
+        iData = self.data()
+        painter.setPen(self.color())
+        x0 = xMap.transform(self.baseline())
+        y0 = yMap.transform(self.baseline())
+        for i in range(iData.size()):
+            if self.testHistogramAttribute(HistogramItem.Xfy):
+                x2 = xMap.transform(iData.sample(i).value)
+                if x2 == x0:
+                    continue
+
+                y1 = yMap.transform(iData.sample(i).interval.minValue())
+                y2 = yMap.transform(iData.sample(i).interval.maxValue())
+
+                if y1 > y2:
+                    y1, y2 = y2, y1
+                    
+                if  i < iData.size()-2:
+                    yy1 = yMap.transform(iData.sample(i+1).interval.minValue())
+                    yy2 = yMap.transform(iData.sample(i+1).interval.maxValue())
+
+                    if y2 == min(yy1, yy2):
+                        xx2 = xMap.transform(iData.sample(i+1).interval.minValue())
+                        if xx2 != x0 and ((xx2 < x0 and x2 < x0)
+                                          or (xx2 > x0 and x2 > x0)):
+                            # One pixel distance between neighboured bars
+                            y2 += 1
+
+                self.drawBar(
+                    painter, Qt.Horizontal, QRect(x0, y1, x2-x0, y2-y1))
+            else:
+                y2 = yMap.transform(iData.sample(i).value)
+                if y2 == y0:
+                    continue
+
+                x1 = xMap.transform(iData.sample(i).interval.minValue())
+                x2 = xMap.transform(iData.sample(i).interval.maxValue())
+
+                if x1 > x2:
+                    x1, x2 = x2, x1
+
+                if i < iData.size()-2:
+                    xx1 = xMap.transform(iData.sample(i+1).interval.minValue())
+                    xx2 = xMap.transform(iData.sample(i+1).interval.maxValue())
+                    x2 = min(xx1, xx2)
+                    yy2 = yMap.transform(iData.sample(i+1).value)
+                    if x2 == min(xx1, xx2):
+                        if yy2 != 0 and (( yy2 < y0 and y2 < y0)
+                                         or (yy2 > y0 and y2 > y0)):
+                            # One pixel distance between neighboured bars
+                            x2 -= 1
+                
+                self.drawBar(
+                    painter, Qt.Vertical, QRect(x1, y0, x2-x1, y2-y0))
+
+    def setBaseline(self, reference):
+        if self.baseline() != reference:
+            self.__reference = reference
+            self.itemChanged()
+    
+    def baseline(self,):
+        return self.__reference
+
+    def setHistogramAttribute(self, attribute, on = True):
+        if self.testHistogramAttribute(attribute):
+            return
+
+        if on:
+            self.__attributes |= attribute
+        else:
+            self.__attributes &= ~attribute
+
+        self.itemChanged()
+
+    def testHistogramAttribute(self, attribute):
+        return bool(self.__attributes & attribute) 
+
+    def drawBar(self, painter, orientation, rect):
+        painter.save()
+        color = painter.pen().color()
+        r = rect.normalized()
+        factor = 125;
+        light = color.lighter(factor)
+        dark = color.darker(factor)
+
+        painter.setBrush(color)
+        painter.setPen(Qt.NoPen)
+        QwtPainter.drawRect(painter, r.x()+1, r.y()+1,
+                                r.width()-2, r.height()-2)
+
+        painter.setBrush(Qt.NoBrush)
+
+        painter.setPen(QPen(light, 2))
+        QwtPainter.drawLine(
+            painter, r.left()+1, r.top()+2, r.right()+1, r.top()+2)
+
+        painter.setPen(QPen(dark, 2))
+        QwtPainter.drawLine(
+            painter, r.left()+1, r.bottom(), r.right()+1, r.bottom())
+
+        painter.setPen(QPen(light, 1))
+        QwtPainter.drawLine(
+            painter, r.left(), r.top() + 1, r.left(), r.bottom())
+        QwtPainter.drawLine(
+            painter, r.left()+1, r.top()+2, r.left()+1, r.bottom()-1)
+
+        painter.setPen(QPen(dark, 1))
+        QwtPainter.drawLine(
+            painter, r.right()+1, r.top()+1, r.right()+1, r.bottom())
+        QwtPainter.drawLine(
+            painter, r.right(), r.top()+2, r.right(), r.bottom()-1)
+
+        painter.restore()
+
+
+def make():
+    demo = QwtPlot()
+    demo.setCanvasBackground(Qt.white)
+    demo.setTitle("Histogram")
+
+    grid = QwtPlotGrid()
+    grid.enableXMin(True)
+    grid.enableYMin(True)
+    grid.setMajorPen(QPen(Qt.black, 0, Qt.DotLine));
+    grid.setMinorPen(QPen(Qt.gray, 0 , Qt.DotLine));
+    grid.attach(demo)
+
+    histogram = HistogramItem()
+    histogram.setColor(Qt.darkCyan)
+
+    numValues = 20
+    samples = []
+    pos = 0.0
+    for i in range(numValues):
+        width = 5 + random.randint(0, 4)
+        value = random.randint(0, 99)
+        samples.append(QwtIntervalSample(value, QwtInterval(pos, pos+width)));
+        pos += width
+
+    histogram.setData(QwtIntervalSeriesData(samples))
+    histogram.attach(demo)
+    demo.setAxisScale(QwtPlot.yLeft, 0.0, 100.0)
+    demo.setAxisScale(QwtPlot.xBottom, 0.0, pos)
+    demo.replot()
+    demo.resize(600, 400)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/ImagePlotDemo.py b/examples/ImagePlotDemo.py
new file mode 100644
index 0000000..1871ee1
--- /dev/null
+++ b/examples/ImagePlotDemo.py
@@ -0,0 +1,184 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen, qRgb
+from qwt.qt.QtCore import Qt
+from qwt import (QwtPlot, QwtPlotMarker, QwtLegend, QwtPlotGrid, QwtPlotCurve,
+                 QwtPlotItem, QwtText, QwtLegendData, QwtLinearColorMap,
+                 QwtInterval, QwtScaleMap, toQImage)
+
+#FIXME: This example is still not working: I suspect an issue related to image scaling (see PlotImage.draw)
+
+def bytescale(data, cmin=None, cmax=None, high=255, low=0):
+    if ((hasattr(data, 'dtype') and data.dtype.char == np.uint8)
+        or (hasattr(data, 'typecode') and data.typecode == np.uint8)
+        ):
+        return data
+    high = high - low
+    if cmin is None:
+        cmin = min(np.ravel(data))
+    if cmax is None:
+        cmax = max(np.ravel(data))
+    scale = high * 1.0 / (cmax-cmin or 1)
+    bytedata = ((data*1.0-cmin)*scale + 0.4999).astype(np.uint8)
+    return bytedata + np.asarray(low).astype(np.uint8)
+
+def linearX(nx, ny):
+    return np.repeat(np.arange(nx, typecode = np.float32)[:, np.newaxis], ny, -1)
+
+def linearY(nx, ny):
+    return np.repeat(np.arange(ny, typecode = np.float32)[np.newaxis, :], nx, 0)
+
+def square(n, min, max):
+    t = np.arange(min, max, float(max-min)/(n-1))
+    #return outer(cos(t), sin(t))
+    return np.cos(t)*np.sin(t)[:,np.newaxis]
+    
+
+class PlotImage(QwtPlotItem):
+    def __init__(self, title = QwtText()):
+        QwtPlotItem.__init__(self)
+        self.setTitle(title)
+        self.setItemAttribute(QwtPlotItem.Legend);
+        self.xyzs = None
+    
+    def setData(self, xyzs, xRange = None, yRange = None):
+        self.xyzs = xyzs
+        shape = xyzs.shape
+        if not xRange:
+            xRange = (0, shape[0])
+        if not yRange:
+            yRange = (0, shape[1])
+
+        self.xMap = QwtScaleMap(0, xyzs.shape[0], *xRange)
+        self.plot().setAxisScale(QwtPlot.xBottom, *xRange)
+        self.yMap = QwtScaleMap(0, xyzs.shape[1], *yRange)
+        self.plot().setAxisScale(QwtPlot.yLeft, *yRange)
+        
+        self.image = toQImage(bytescale(self.xyzs)).mirrored(False, True)
+        for i in range(0, 256):
+            self.image.setColor(i, qRgb(i, 0, 255-i))
+
+    def updateLegend(self, legend):
+        QwtPlotItem.updateLegend(self, legend)
+        legend.find(self).setText(self.title())
+
+    def draw(self, painter, xMap, yMap, rect):
+        """Paint image zoomed to xMap, yMap
+
+        Calculate (x1, y1, x2, y2) so that it contains at least 1 pixel,
+        and copy the visible region to scale it to the canvas.
+        """
+        assert(isinstance(self.plot(), QwtPlot))
+        
+        # calculate y1, y2
+        # the scanline order (index y) is inverted with respect to the y-axis
+        y1 = y2 = self.image.height()
+        y1 *= (self.yMap.s2() - yMap.s2())
+        y1 /= (self.yMap.s2() - self.yMap.s1())
+        y1 = max(0, int(y1-0.5))
+        y2 *= (self.yMap.s2() - yMap.s1())
+        y2 /= (self.yMap.s2() - self.yMap.s1())
+        y2 = min(self.image.height(), int(y2+0.5))
+        # calculate x1, x2 -- the pixel order (index x) is normal
+        x1 = x2 = self.image.width()
+        x1 *= (xMap.s1() - self.xMap.s1())
+        x1 /= (self.xMap.s2() - self.xMap.s1())
+        x1 = max(0, int(x1-0.5))
+        x2 *= (xMap.s2() - self.xMap.s1())
+        x2 /= (self.xMap.s2() - self.xMap.s1())
+        x2 = min(self.image.width(), int(x2+0.5))
+        # copy
+        image = self.image.copy(x1, y1, x2-x1, y2-y1)
+        # zoom
+        image = image.scaled(xMap.p2()-xMap.p1()+1, yMap.p1()-yMap.p2()+1)
+        # draw
+        painter.drawImage(xMap.p1(), yMap.p2(), image)
+    
+
+class ImagePlot(QwtPlot):
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+        # set plot title
+        self.setTitle('ImagePlot')
+        # set plot layout
+        self.plotLayout().setCanvasMargin(0)
+        self.plotLayout().setAlignCanvasToScales(True)
+        # set legend
+        legend = QwtLegend()
+        legend.setDefaultItemMode(QwtLegendData.Clickable)
+        self.insertLegend(legend, QwtPlot.RightLegend)
+        # set axis titles
+        self.setAxisTitle(QwtPlot.xBottom, 'time (s)')
+        self.setAxisTitle(QwtPlot.yLeft, 'frequency (Hz)')
+
+        colorMap = QwtLinearColorMap(Qt.blue, Qt.red)
+        interval = QwtInterval(-1, 1)
+        self.enableAxis(QwtPlot.yRight)
+        self.setAxisScale(QwtPlot.yRight, -1, 1)
+        self.axisWidget(QwtPlot.yRight).setColorBarEnabled(True)
+        self.axisWidget(QwtPlot.yRight).setColorMap(interval, colorMap)
+
+        # calculate 3 NumPy arrays
+        x = np.arange(-2*np.pi, 2*np.pi, 0.01)
+        y = np.pi*np.sin(x)
+        z = 4*np.pi*np.cos(x)*np.cos(x)*np.sin(x)
+        # attach a curve
+        curve = QwtPlotCurve('y = pi*sin(x)')
+        curve.attach(self)
+        curve.setPen(QPen(Qt.green, 2))
+        curve.setData(x, y)
+        # attach another curve
+        curve = QwtPlotCurve('y = 4*pi*sin(x)*cos(x)**2')
+        curve.attach(self)
+        curve.setPen(QPen(Qt.black, 2))
+        curve.setData(x, z)
+        # attach a grid
+        grid = QwtPlotGrid()
+        grid.attach(self)
+        grid.setPen(QPen(Qt.black, 0, Qt.DotLine))
+        # attach a horizontal marker at y = 0
+        marker = QwtPlotMarker()
+        marker.attach(self)
+        marker.setValue(0.0, 0.0)
+        marker.setLineStyle(QwtPlotMarker.HLine)
+        marker.setLabelAlignment(Qt.AlignRight | Qt.AlignTop)
+        marker.setLabel(QwtText('y = 0'))
+        # attach a vertical marker at x = pi
+        marker = QwtPlotMarker()
+        marker.attach(self)
+        marker.setValue(np.pi, 0.0)
+        marker.setLineStyle(QwtPlotMarker.VLine)
+        marker.setLabelAlignment(Qt.AlignRight | Qt.AlignBottom)
+        marker.setLabel(QwtText('x = pi'))
+        # attach a plot image
+        plotImage = PlotImage('Image')
+        plotImage.attach(self)
+        plotImage.setData(square(512, -2*np.pi, 2*np.pi),
+                          (-2*np.pi, 2*np.pi), (-2*np.pi, 2*np.pi))
+
+        legend.SIG_CLICKED.connect(self.toggleVisibility)
+        
+        # replot
+        self.replot()
+
+    def toggleVisibility(self, plotItem, idx):
+        """Toggle the visibility of a plot item
+        """
+        plotItem.setVisible(not plotItem.isVisible())
+        self.replot()
+
+
+def make():
+    demo = ImagePlot()
+    demo.resize(600, 400)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/MapDemo.py b/examples/MapDemo.py
new file mode 100644
index 0000000..9875e82
--- /dev/null
+++ b/examples/MapDemo.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python
+
+import random
+import sys
+import time
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen, QBrush, QMainWindow, QToolBar
+from qwt.qt.QtCore import QSize
+from qwt.qt.QtCore import Qt
+from qwt import QwtPlot, QwtSymbol, QwtPlotCurve
+
+
+def standard_map(x, y, kappa):
+    """provide one interate of the inital conditions (x, y)
+       for the standard map with parameter kappa."""
+    y_new = y-kappa*np.sin(2.0*np.pi*x)
+    x_new = x+y_new
+    # bring back to [0,1.0]^2
+    if( (x_new>1.0) or (x_new<0.0) ):
+         x_new = x_new - np.floor(x_new)
+    if( (y_new>1.0) or (y_new<0.0) ):
+         y_new = y_new - np.floor(y_new)
+    return x_new, y_new
+
+
+class MapDemo(QMainWindow):
+    def __init__(self, *args):
+        QMainWindow.__init__(self, *args)
+        self.plot = QwtPlot(self)
+        self.plot.setTitle("A Simple Map Demonstration")
+        self.plot.setCanvasBackground(Qt.white)
+        self.plot.setAxisTitle(QwtPlot.xBottom, "x")
+        self.plot.setAxisTitle(QwtPlot.yLeft, "y")    
+        self.plot.setAxisScale(QwtPlot.xBottom, 0.0, 1.0)
+        self.plot.setAxisScale(QwtPlot.yLeft, 0.0, 1.0)
+        self.setCentralWidget(self.plot)
+        # Initialize map data
+        self.count = self.i = 1000
+        self.xs = np.zeros(self.count, np.float)
+        self.ys = np.zeros(self.count, np.float)
+        self.kappa = 0.2
+        self.curve = QwtPlotCurve("Map")
+        self.curve.attach(self.plot)
+        self.curve.setSymbol(QwtSymbol(QwtSymbol.Ellipse,
+                                           QBrush(Qt.red),
+                                           QPen(Qt.blue),
+                                           QSize(5, 5)))
+        self.curve.setPen(QPen(Qt.cyan))
+        toolBar = QToolBar(self)
+        self.addToolBar(toolBar)
+        # 1 tick = 1 ms, 10 ticks = 10 ms (Linux clock is 100 Hz)
+        self.ticks = 10
+        self.tid = self.startTimer(self.ticks)
+        self.timer_tic = None
+        self.user_tic = None
+        self.system_tic = None    
+        self.plot.replot()
+
+    def setTicks(self, ticks):
+        self.i = self.count
+        self.ticks = int(ticks)
+        self.killTimer(self.tid)
+        self.tid = self.startTimer(ticks)
+        
+    def resizeEvent(self, event):
+        self.plot.resize(event.size())
+        self.plot.move(0, 0)
+
+    def moreData(self):
+        if self.i == self.count:
+            self.i = 0
+            self.x = random.random()
+            self.y = random.random()
+            self.xs[self.i] = self.x
+            self.ys[self.i] = self.y
+            self.i += 1
+            chunks = []
+            self.timer_toc = time.time()
+            if self.timer_tic:
+                chunks.append("wall: %s s." % (self.timer_toc-self.timer_tic))
+                print(' '.join(chunks))
+            self.timer_tic = self.timer_toc
+        else:
+            self.x, self.y = standard_map(self.x, self.y, self.kappa)
+            self.xs[self.i] = self.x
+            self.ys[self.i] = self.y
+            self.i += 1
+        
+    def timerEvent(self, e):
+        self.moreData()
+        self.curve.setData(self.xs[:self.i], self.ys[:self.i])
+        self.plot.replot()
+
+
+def make():
+    demo = MapDemo()
+    demo.resize(600, 600)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/MultiDemo.py b/examples/MultiDemo.py
new file mode 100644
index 0000000..8f7b6b8
--- /dev/null
+++ b/examples/MultiDemo.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen, QGridLayout, QWidget
+from qwt.qt.QtCore import Qt
+from qwt import QwtPlot, QwtPlotCurve
+
+
+def drange(start, stop, step):
+    start, stop, step = float(start), float(stop), float(step)
+    size = int(round((stop-start)/step))
+    result = [start]*size
+    for i in range(size):
+        result[i] += i*step
+    return result
+        
+def lorentzian(x):
+    return 1.0/(1.0+(x-5.0)**2)
+
+
+class MultiDemo(QWidget):
+    def __init__(self, *args):
+        QWidget.__init__(self, *args)
+        layout = QGridLayout(self)        
+        # try to create a plot for SciPy arrays
+
+        # make a curve and copy the data
+        numpy_curve = QwtPlotCurve('y = lorentzian(x)')
+        x = np.arange(0.0, 10.0, 0.01)
+        y = lorentzian(x)
+        numpy_curve.setData(x, y)
+        # here, we know we can plot NumPy arrays
+        numpy_plot = QwtPlot(self)
+        numpy_plot.setTitle('numpy array')
+        numpy_plot.setCanvasBackground(Qt.white)
+        numpy_plot.plotLayout().setCanvasMargin(0)
+        numpy_plot.plotLayout().setAlignCanvasToScales(True)
+        # insert a curve and make it red
+        numpy_curve.attach(numpy_plot)
+        numpy_curve.setPen(QPen(Qt.red))
+        layout.addWidget(numpy_plot, 0, 0)
+        numpy_plot.replot()
+
+        # create a plot widget for lists of Python floats
+        list_plot = QwtPlot(self)
+        list_plot.setTitle('Python list')
+        list_plot.setCanvasBackground(Qt.white)
+        list_plot.plotLayout().setCanvasMargin(0)
+        list_plot.plotLayout().setAlignCanvasToScales(True)
+        x = drange(0.0, 10.0, 0.01)
+        y = [lorentzian(item) for item in x]
+        # insert a curve, make it red and copy the lists
+        list_curve = QwtPlotCurve('y = lorentzian(x)')
+        list_curve.attach(list_plot)
+        list_curve.setPen(QPen(Qt.red))
+        list_curve.setData(x, y)
+        layout.addWidget(list_plot, 0, 1)
+        list_plot.replot()
+
+
+def make():
+    demo = MultiDemo()
+    demo.resize(400, 300)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    sys.exit(app.exec_())
diff --git a/examples/ReallySimpleDemo.py b/examples/ReallySimpleDemo.py
new file mode 100644
index 0000000..3648a8d
--- /dev/null
+++ b/examples/ReallySimpleDemo.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+from qwt.qt.QtGui import QApplication, QPen
+from qwt.qt.QtCore import Qt
+from qwt import QwtPlot, QwtPlotMarker, QwtLegend, QwtPlotCurve, QwtText
+
+
+class SimplePlot(QwtPlot):
+    def __init__(self, *args):
+        QwtPlot.__init__(self, *args)
+        self.setTitle('ReallySimpleDemo.py')
+        self.insertLegend(QwtLegend(), QwtPlot.RightLegend)
+        self.setAxisTitle(QwtPlot.xBottom, 'x -->')
+        self.setAxisTitle(QwtPlot.yLeft, 'y -->')
+        self.enableAxis(self.xBottom)
+
+        # insert a few curves
+        cSin = QwtPlotCurve('y = sin(x)')
+        cSin.setPen(QPen(Qt.red))
+        cSin.attach(self)
+        cCos = QwtPlotCurve('y = cos(x)')
+        cCos.setPen(QPen(Qt.blue))
+        cCos.attach(self)
+        
+        # make a Numeric array for the horizontal data
+        x = np.arange(0.0, 10.0, 0.1)
+
+        # initialize the data
+        cSin.setData(x, np.sin(x))
+        cCos.setData(x, np.cos(x))
+
+        # insert a horizontal marker at y = 0
+        mY = QwtPlotMarker()
+        mY.setLabel(QwtText('y = 0'))
+        mY.setLabelAlignment(Qt.AlignRight | Qt.AlignTop)
+        mY.setLineStyle(QwtPlotMarker.HLine)
+        mY.setYValue(0.0)
+        mY.attach(self)
+
+        # insert a vertical marker at x = 2 pi
+        mX = QwtPlotMarker()
+        mX.setLabel(QwtText('x = 2 pi'))
+        mX.setLabelAlignment(Qt.AlignRight | Qt.AlignTop)
+        mX.setLineStyle(QwtPlotMarker.VLine)
+        mX.setXValue(2*np.pi)
+        mX.attach(self)
+
+        # replot
+        self.replot()
+
+
+def make():
+    demo = SimplePlot()
+    demo.resize(800, 500)
+    demo.show()
+    return demo
+
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    demo = make()
+    demo.exportTo("demo.png", size=(1600, 900), resolution=200)
+    sys.exit(app.exec_())
diff --git a/python_qwt.egg-info/PKG-INFO b/python_qwt.egg-info/PKG-INFO
index 21a429f..44de04f 100644
--- a/python_qwt.egg-info/PKG-INFO
+++ b/python_qwt.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-qwt
-Version: 6.1.2a5
+Version: 6.1.2a6
 Summary: Qt plotting widgets for Python
 Home-page: https://github.com/PierreRaybaut/python-qwt
 Author: Pierre Raybaut
diff --git a/python_qwt.egg-info/SOURCES.txt b/python_qwt.egg-info/SOURCES.txt
index e5879ad..1e92d3d 100644
--- a/python_qwt.egg-info/SOURCES.txt
+++ b/python_qwt.egg-info/SOURCES.txt
@@ -1,9 +1,21 @@
 CHANGELOG
 LICENSE
 MANIFEST.in
-QwtLicense
 README
 setup.py
+examples/BodeDemo.py
+examples/CPUplot.py
+examples/CartesianDemo.py
+examples/CurveDemo1.py
+examples/CurveDemo2.py
+examples/DataDemo.py
+examples/ErrorBarDemo.py
+examples/EventFilterDemo.py
+examples/HistogramDemo.py
+examples/ImagePlotDemo.py
+examples/MapDemo.py
+examples/MultiDemo.py
+examples/ReallySimpleDemo.py
 python_qwt.egg-info/PKG-INFO
 python_qwt.egg-info/SOURCES.txt
 python_qwt.egg-info/dependency_links.txt
diff --git a/qwt/__init__.py b/qwt/__init__.py
index 2508e51..083e8a3 100644
--- a/qwt/__init__.py
+++ b/qwt/__init__.py
@@ -1,9 +1,11 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
-__version__ = QWT_VERSION_STR = '6.1.2a5'
+__version__ = QWT_VERSION_STR = '6.1.2a6'
 
 import warnings
 
diff --git a/qwt/clipper.py b/qwt/clipper.py
index 4e4cc91..27b4211 100644
--- a/qwt/clipper.py
+++ b/qwt/clipper.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QPolygon, QPolygonF
 from qwt.qt.QtCore import QRect, QRectF
diff --git a/qwt/color_map.py b/qwt/color_map.py
index 49ab85e..901d17c 100644
--- a/qwt/color_map.py
+++ b/qwt/color_map.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QColor, qRed, qGreen, qBlue, qRgb, qRgba, qAlpha
 from qwt.qt.QtCore import Qt, qIsNaN
diff --git a/qwt/column_symbol.py b/qwt/column_symbol.py
index 6fe4d08..586a24d 100644
--- a/qwt/column_symbol.py
+++ b/qwt/column_symbol.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.interval import QwtInterval
 from qwt.painter import QwtPainter
diff --git a/qwt/curve_fitter.py b/qwt/curve_fitter.py
index 0c11139..9b72d6e 100644
--- a/qwt/curve_fitter.py
+++ b/qwt/curve_fitter.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.spline import QwtSpline
 
diff --git a/qwt/dyngrid_layout.py b/qwt/dyngrid_layout.py
index 340acdd..5b0683b 100644
--- a/qwt/dyngrid_layout.py
+++ b/qwt/dyngrid_layout.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QLayout
 from qwt.qt.QtCore import Qt, QRect, QSize
diff --git a/qwt/graphic.py b/qwt/graphic.py
index a5c30fc..09aab8c 100644
--- a/qwt/graphic.py
+++ b/qwt/graphic.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.null_paintdevice import QwtNullPaintDevice
 from qwt.painter_command import QwtPainterCommand
diff --git a/qwt/interval.py b/qwt/interval.py
index 70b2fa9..7b97fb3 100644
--- a/qwt/interval.py
+++ b/qwt/interval.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 
 class QwtInterval(object):
diff --git a/qwt/legend.py b/qwt/legend.py
index fefa8d1..79de0f0 100644
--- a/qwt/legend.py
+++ b/qwt/legend.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.legend_data import QwtLegendData
 from qwt.dyngrid_layout import QwtDynGridLayout
diff --git a/qwt/legend_data.py b/qwt/legend_data.py
index 1942ee7..eecc603 100644
--- a/qwt/legend_data.py
+++ b/qwt/legend_data.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.text import QwtText
 
diff --git a/qwt/legend_label.py b/qwt/legend_label.py
index 3202d41..98c67ca 100644
--- a/qwt/legend_label.py
+++ b/qwt/legend_label.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.text import QwtTextLabel
 from qwt.legend_data import QwtLegendData
diff --git a/qwt/math.py b/qwt/math.py
index e12a00c..d6eb818 100644
--- a/qwt/math.py
+++ b/qwt/math.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtCore import qFuzzyCompare
 
diff --git a/qwt/null_paintdevice.py b/qwt/null_paintdevice.py
index 9608039..9535241 100644
--- a/qwt/null_paintdevice.py
+++ b/qwt/null_paintdevice.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QPaintEngine, QPainterPath, QPaintDevice
 
diff --git a/qwt/painter.py b/qwt/painter.py
index e022136..d08aa07 100644
--- a/qwt/painter.py
+++ b/qwt/painter.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.clipper import QwtClipper
 from qwt.color_map import QwtColorMap
diff --git a/qwt/painter_command.py b/qwt/painter_command.py
index cf3b5b6..987da97 100644
--- a/qwt/painter_command.py
+++ b/qwt/painter_command.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QPainterPath, QPaintEngine
 
diff --git a/qwt/pixel_matrix.py b/qwt/pixel_matrix.py
index fffcce6..9eae099 100644
--- a/qwt/pixel_matrix.py
+++ b/qwt/pixel_matrix.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtCore import QBitArray
 
diff --git a/qwt/plot.py b/qwt/plot.py
index b2f7091..1d1c0e6 100644
--- a/qwt/plot.py
+++ b/qwt/plot.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import (QWidget, QFont, QSizePolicy, QFrame, QApplication,
                           QRegion, QPainter, QPalette)
diff --git a/qwt/plot_canvas.py b/qwt/plot_canvas.py
index 704422d..1845377 100644
--- a/qwt/plot_canvas.py
+++ b/qwt/plot_canvas.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.null_paintdevice import QwtNullPaintDevice
 from qwt.painter import QwtPainter
diff --git a/qwt/plot_curve.py b/qwt/plot_curve.py
index 993a282..99e1b0b 100644
--- a/qwt/plot_curve.py
+++ b/qwt/plot_curve.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.curve_fitter import QwtSplineCurveFitter
 from qwt.text import QwtText
diff --git a/qwt/plot_directpainter.py b/qwt/plot_directpainter.py
index bf55e93..a57b486 100644
--- a/qwt/plot_directpainter.py
+++ b/qwt/plot_directpainter.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QPainter, QRegion
 from qwt.qt.QtCore import QObject, QT_VERSION, Qt, QEvent
diff --git a/qwt/plot_grid.py b/qwt/plot_grid.py
index 16eab7c..d46cdf9 100644
--- a/qwt/plot_grid.py
+++ b/qwt/plot_grid.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.scale_div import QwtScaleDiv
 from qwt.plot import QwtPlotItem
diff --git a/qwt/plot_histogram.py b/qwt/plot_histogram.py
index 00f1631..94fa05c 100644
--- a/qwt/plot_histogram.py
+++ b/qwt/plot_histogram.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.plot_seriesitem import QwtPlotSeriesItem
 from qwt.series_store import QwtSeriesStore
diff --git a/qwt/plot_layout.py b/qwt/plot_layout.py
index ef0d419..57676d9 100644
--- a/qwt/plot_layout.py
+++ b/qwt/plot_layout.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.text import QwtText
 from qwt.scale_widget import QwtScaleWidget
diff --git a/qwt/plot_marker.py b/qwt/plot_marker.py
index ddfc958..87e05e4 100644
--- a/qwt/plot_marker.py
+++ b/qwt/plot_marker.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.plot import QwtPlotItem
 from qwt.text import QwtText
diff --git a/qwt/plot_renderer.py b/qwt/plot_renderer.py
index 5227e01..0591c11 100644
--- a/qwt/plot_renderer.py
+++ b/qwt/plot_renderer.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from __future__ import division
 
diff --git a/qwt/plot_seriesitem.py b/qwt/plot_seriesitem.py
index b971d22..b52ee42 100644
--- a/qwt/plot_seriesitem.py
+++ b/qwt/plot_seriesitem.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.plot import QwtPlotItem, QwtPlotItem_PrivateData
 from qwt.text import QwtText
diff --git a/qwt/point_data.py b/qwt/point_data.py
index 8a75fc2..2048ffe 100644
--- a/qwt/point_data.py
+++ b/qwt/point_data.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.series_data import QwtSeriesData, qwtBoundingRect
 from qwt.interval import QwtInterval
diff --git a/qwt/point_mapper.py b/qwt/point_mapper.py
index 99fff55..c8745f4 100644
--- a/qwt/point_mapper.py
+++ b/qwt/point_mapper.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 USE_THREADS = False  # QtConcurrent is not supported by PyQt
 
diff --git a/qwt/py3compat.py b/qwt/py3compat.py
index cdce3e2..a1929a0 100644
--- a/qwt/py3compat.py
+++ b/qwt/py3compat.py
@@ -2,7 +2,7 @@
 #
 # Copyright © 2012-2013 Pierre Raybaut
 # Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
+# (see LICENSE file for details)
 
 """
 guidata.py3compat (exact copy of spyderlib.py3compat)
diff --git a/qwt/qt/QtCore.py b/qwt/qt/QtCore.py
index fe09ff0..d7bf78e 100644
--- a/qwt/qt/QtCore.py
+++ b/qwt/qt/QtCore.py
@@ -1,29 +1,29 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2011 Pierre Raybaut
-# Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
-
-import os
-
-if os.environ['QT_API'] == 'pyqt5':
-    from PyQt5.QtCore import *                                # analysis:ignore
-    from PyQt5.QtCore import QCoreApplication
-    from PyQt5.QtCore import pyqtSignal as Signal
-    from PyQt5.QtCore import pyqtSlot as Slot
-    from PyQt5.QtCore import pyqtProperty as Property
-    from PyQt5.QtCore import QT_VERSION_STR as __version__
-elif os.environ['QT_API'] == 'pyqt':
-    from PyQt4.QtCore import *                                # analysis:ignore
-    from PyQt4.Qt import QCoreApplication                     # analysis:ignore
-    from PyQt4.Qt import Qt                                   # analysis:ignore
-    from PyQt4.QtCore import pyqtSignal as Signal             # analysis:ignore
-    from PyQt4.QtCore import pyqtSlot as Slot                 # analysis:ignore
-    from PyQt4.QtCore import pyqtProperty as Property         # analysis:ignore
-    from PyQt4.QtCore import QT_VERSION_STR as __version__    # analysis:ignore
-    # Forces new modules written by PyQt4 developers to be PyQt5-compatible
-    del SIGNAL, SLOT
-else:
-    import PySide.QtCore
-    __version__ = PySide.QtCore.__version__                   # analysis:ignore
-    from PySide.QtCore import *                               # analysis:ignore
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2011 Pierre Raybaut
+# Licensed under the terms of the MIT License
+# (see LICENSE file for details)
+
+import os
+
+if os.environ['QT_API'] == 'pyqt5':
+    from PyQt5.QtCore import *                                # analysis:ignore
+    from PyQt5.QtCore import QCoreApplication
+    from PyQt5.QtCore import pyqtSignal as Signal
+    from PyQt5.QtCore import pyqtSlot as Slot
+    from PyQt5.QtCore import pyqtProperty as Property
+    from PyQt5.QtCore import QT_VERSION_STR as __version__
+elif os.environ['QT_API'] == 'pyqt':
+    from PyQt4.QtCore import *                                # analysis:ignore
+    from PyQt4.Qt import QCoreApplication                     # analysis:ignore
+    from PyQt4.Qt import Qt                                   # analysis:ignore
+    from PyQt4.QtCore import pyqtSignal as Signal             # analysis:ignore
+    from PyQt4.QtCore import pyqtSlot as Slot                 # analysis:ignore
+    from PyQt4.QtCore import pyqtProperty as Property         # analysis:ignore
+    from PyQt4.QtCore import QT_VERSION_STR as __version__    # analysis:ignore
+    # Forces new modules written by PyQt4 developers to be PyQt5-compatible
+    del SIGNAL, SLOT
+else:
+    import PySide.QtCore
+    __version__ = PySide.QtCore.__version__                   # analysis:ignore
+    from PySide.QtCore import *                               # analysis:ignore
diff --git a/qwt/qt/QtGui.py b/qwt/qt/QtGui.py
index a757e90..6e5a591 100644
--- a/qwt/qt/QtGui.py
+++ b/qwt/qt/QtGui.py
@@ -1,20 +1,20 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2011 Pierre Raybaut
-# Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
-
-import os
-
-if os.environ['QT_API'] == 'pyqt5':
-    from PyQt5.QtCore import QSortFilterProxyModel            # analysis:ignore
-    from PyQt5.QtPrintSupport import (QPrinter, QPrintDialog, # analysis:ignore
-                                      QAbstractPrintDialog)
-    from PyQt5.QtPrintSupport import QPrintPreviewDialog      # analysis:ignore
-    from PyQt5.QtGui import *                                 # analysis:ignore
-    from PyQt5.QtWidgets import *                             # analysis:ignore
-elif os.environ['QT_API'] == 'pyqt':
-    from PyQt4.Qt import QKeySequence, QTextCursor            # analysis:ignore
-    from PyQt4.QtGui import *                                 # analysis:ignore
-else:
-    from PySide.QtGui import *                                # analysis:ignore
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2011 Pierre Raybaut
+# Licensed under the terms of the MIT License
+# (see LICENSE file for details)
+
+import os
+
+if os.environ['QT_API'] == 'pyqt5':
+    from PyQt5.QtCore import QSortFilterProxyModel            # analysis:ignore
+    from PyQt5.QtPrintSupport import (QPrinter, QPrintDialog, # analysis:ignore
+                                      QAbstractPrintDialog)
+    from PyQt5.QtPrintSupport import QPrintPreviewDialog      # analysis:ignore
+    from PyQt5.QtGui import *                                 # analysis:ignore
+    from PyQt5.QtWidgets import *                             # analysis:ignore
+elif os.environ['QT_API'] == 'pyqt':
+    from PyQt4.Qt import QKeySequence, QTextCursor            # analysis:ignore
+    from PyQt4.QtGui import *                                 # analysis:ignore
+else:
+    from PySide.QtGui import *                                # analysis:ignore
diff --git a/qwt/qt/QtSvg.py b/qwt/qt/QtSvg.py
index f4443b6..7b8f89c 100644
--- a/qwt/qt/QtSvg.py
+++ b/qwt/qt/QtSvg.py
@@ -1,14 +1,14 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2012 Pierre Raybaut
-# Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
-
-import os
-
-if os.environ['QT_API'] == 'pyqt5':
-    from PyQt5.QtSvg import *                                 # analysis:ignore
-elif os.environ['QT_API'] == 'pyqt':
-    from PyQt4.QtSvg import *                                 # analysis:ignore
-else:
-    from PySide.QtSvg import *                                # analysis:ignore
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2012 Pierre Raybaut
+# Licensed under the terms of the MIT License
+# (see LICENSE file for details)
+
+import os
+
+if os.environ['QT_API'] == 'pyqt5':
+    from PyQt5.QtSvg import *                                 # analysis:ignore
+elif os.environ['QT_API'] == 'pyqt':
+    from PyQt4.QtSvg import *                                 # analysis:ignore
+else:
+    from PySide.QtSvg import *                                # analysis:ignore
diff --git a/qwt/qt/QtWebKit.py b/qwt/qt/QtWebKit.py
index 60c6dca..369fc9d 100644
--- a/qwt/qt/QtWebKit.py
+++ b/qwt/qt/QtWebKit.py
@@ -1,16 +1,16 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2011 Pierre Raybaut
-# Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
-
-import os
-
-if os.environ['QT_API'] == 'pyqt5':
-    from PyQt5.QtWebKitWidgets import QWebPage, QWebView      # analysis:ignore
-    from PyQt5.QtWebKit import QWebSettings                   # analysis:ignore
-elif os.environ['QT_API'] == 'pyqt':
-    from PyQt4.QtWebKit import (QWebPage, QWebView,           # analysis:ignore
-                                QWebSettings)
-else:
-    from PySide.QtWebKit import *                             # analysis:ignore
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2011 Pierre Raybaut
+# Licensed under the terms of the MIT License
+# (see LICENSE file for details)
+
+import os
+
+if os.environ['QT_API'] == 'pyqt5':
+    from PyQt5.QtWebKitWidgets import QWebPage, QWebView      # analysis:ignore
+    from PyQt5.QtWebKit import QWebSettings                   # analysis:ignore
+elif os.environ['QT_API'] == 'pyqt':
+    from PyQt4.QtWebKit import (QWebPage, QWebView,           # analysis:ignore
+                                QWebSettings)
+else:
+    from PySide.QtWebKit import *                             # analysis:ignore
diff --git a/qwt/qt/__init__.py b/qwt/qt/__init__.py
index 92cd88c..1b354bf 100644
--- a/qwt/qt/__init__.py
+++ b/qwt/qt/__init__.py
@@ -1,63 +1,63 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2011-2012 Pierre Raybaut
-#           © 2012-2014 anatoly techtonik
-# Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
-
-"""Transitional package (PyQt4 --> PySide)"""
-
-import os
-
-os.environ.setdefault('QT_API', 'pyqt')
-assert os.environ['QT_API'] in ('pyqt5', 'pyqt', 'pyside')
-
-API = os.environ['QT_API']
-API_NAME = {'pyqt5': 'PyQt5', 'pyqt': 'PyQt4', 'pyside': 'PySide'}[API]
-
-PYQT5 = False
-
-if API == 'pyqt5':
-    try:
-        from PyQt5.QtCore import PYQT_VERSION_STR as __version__
-        is_old_pyqt = False
-        is_pyqt46 = False
-        PYQT5 = True
-    except ImportError:
-        pass
-elif API == 'pyqt':
-    # Spyder 2.3 is compatible with both #1 and #2 PyQt API,
-    # but to avoid issues with IPython and other Qt plugins
-    # we choose to support only API #2 for 2.4+
-    import sip
-    try:
-        sip.setapi('QString', 2)
-        sip.setapi('QVariant', 2)
-    except AttributeError:
-        # PyQt < v4.6. The actual check is done by requirements.check_qt()
-        # call from spyder.py
-        pass
-
-    try:
-        from PyQt4.QtCore import PYQT_VERSION_STR as __version__ # analysis:ignore
-    except ImportError:
-        # Switching to PySide
-        API = os.environ['QT_API'] = 'pyside'
-        API_NAME = 'PySide'
-    else:
-        is_old_pyqt = __version__.startswith(('4.4', '4.5', '4.6', '4.7'))
-        is_pyqt46 = __version__.startswith('4.6')
-        import sip
-        try:
-            API_NAME += (" (API v%d)" % sip.getapi('QString'))
-        except AttributeError:
-            pass
-
-
-if API == 'pyside':
-    try:
-        from PySide import __version__  # analysis:ignore
-    except ImportError:
-        raise ImportError("Spyder requires PySide or PyQt to be installed")
-    else:
-        is_old_pyqt = is_pyqt46 = False
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2011-2012 Pierre Raybaut
+#           © 2012-2014 anatoly techtonik
+# Licensed under the terms of the MIT License
+# (see LICENSE file for details)
+
+"""Transitional package (PyQt4 --> PySide)"""
+
+import os
+
+os.environ.setdefault('QT_API', 'pyqt')
+assert os.environ['QT_API'] in ('pyqt5', 'pyqt', 'pyside')
+
+API = os.environ['QT_API']
+API_NAME = {'pyqt5': 'PyQt5', 'pyqt': 'PyQt4', 'pyside': 'PySide'}[API]
+
+PYQT5 = False
+
+if API == 'pyqt5':
+    try:
+        from PyQt5.QtCore import PYQT_VERSION_STR as __version__
+        is_old_pyqt = False
+        is_pyqt46 = False
+        PYQT5 = True
+    except ImportError:
+        pass
+elif API == 'pyqt':
+    # Spyder 2.3 is compatible with both #1 and #2 PyQt API,
+    # but to avoid issues with IPython and other Qt plugins
+    # we choose to support only API #2 for 2.4+
+    import sip
+    try:
+        sip.setapi('QString', 2)
+        sip.setapi('QVariant', 2)
+    except AttributeError:
+        # PyQt < v4.6. The actual check is done by requirements.check_qt()
+        # call from spyder.py
+        pass
+
+    try:
+        from PyQt4.QtCore import PYQT_VERSION_STR as __version__ # analysis:ignore
+    except ImportError:
+        # Switching to PySide
+        API = os.environ['QT_API'] = 'pyside'
+        API_NAME = 'PySide'
+    else:
+        is_old_pyqt = __version__.startswith(('4.4', '4.5', '4.6', '4.7'))
+        is_pyqt46 = __version__.startswith('4.6')
+        import sip
+        try:
+            API_NAME += (" (API v%d)" % sip.getapi('QString'))
+        except AttributeError:
+            pass
+
+
+if API == 'pyside':
+    try:
+        from PySide import __version__  # analysis:ignore
+    except ImportError:
+        raise ImportError("Spyder requires PySide or PyQt to be installed")
+    else:
+        is_old_pyqt = is_pyqt46 = False
diff --git a/qwt/qt/compat.py b/qwt/qt/compat.py
index 46f1480..23ffcf3 100644
--- a/qwt/qt/compat.py
+++ b/qwt/qt/compat.py
@@ -2,7 +2,7 @@
 #
 # Copyright © 2011-2012 Pierre Raybaut
 # Licensed under the terms of the MIT License
-# (see spyderlib/__init__.py for details)
+# (see LICENSE file for details)
 
 """
 spyderlib.qt.compat
diff --git a/qwt/sample.py b/qwt/sample.py
index 0484629..fbc2924 100644
--- a/qwt/sample.py
+++ b/qwt/sample.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.interval import QwtInterval
 
diff --git a/qwt/scale_div.py b/qwt/scale_div.py
index 4d89166..10b6d18 100644
--- a/qwt/scale_div.py
+++ b/qwt/scale_div.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.interval import QwtInterval
 
diff --git a/qwt/scale_draw.py b/qwt/scale_draw.py
index 536e318..1f7ed6c 100644
--- a/qwt/scale_draw.py
+++ b/qwt/scale_draw.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.scale_div import QwtScaleDiv
 from qwt.scale_map import QwtScaleMap
diff --git a/qwt/scale_engine.py b/qwt/scale_engine.py
index 6bb2dbc..7eeb326 100644
--- a/qwt/scale_engine.py
+++ b/qwt/scale_engine.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from __future__ import division
 
diff --git a/qwt/scale_map.py b/qwt/scale_map.py
index 5a9ced3..4a3b11d 100644
--- a/qwt/scale_map.py
+++ b/qwt/scale_map.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.math import qwtFuzzyCompare
 
diff --git a/qwt/scale_widget.py b/qwt/scale_widget.py
index 3827b30..cde3a14 100644
--- a/qwt/scale_widget.py
+++ b/qwt/scale_widget.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.scale_draw import QwtScaleDraw
 from qwt.scale_engine import QwtLinearScaleEngine
diff --git a/qwt/series_data.py b/qwt/series_data.py
index 4c4a52d..693c20f 100644
--- a/qwt/series_data.py
+++ b/qwt/series_data.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.sample import QwtIntervalSample, QwtSetSample, QwtOHLCSample
 
diff --git a/qwt/series_store.py b/qwt/series_store.py
index ab57162..a8f6261 100644
--- a/qwt/series_store.py
+++ b/qwt/series_store.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtCore import QRectF
 
diff --git a/qwt/spline.py b/qwt/spline.py
index 4bd05d7..386f39c 100644
--- a/qwt/spline.py
+++ b/qwt/spline.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.qt.QtGui import QPolygonF
 
diff --git a/qwt/symbol.py b/qwt/symbol.py
index 903fc27..2663333 100644
--- a/qwt/symbol.py
+++ b/qwt/symbol.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.graphic import QwtGraphic
 from qwt.painter import QwtPainter
diff --git a/qwt/text.py b/qwt/text.py
index 2f7cddb..3f09287 100644
--- a/qwt/text.py
+++ b/qwt/text.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.painter import QwtPainter
 from qwt.text_engine import QwtPlainTextEngine, QwtRichTextEngine
diff --git a/qwt/text_engine.py b/qwt/text_engine.py
index 054b274..aaef286 100644
--- a/qwt/text_engine.py
+++ b/qwt/text_engine.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 from qwt.painter import QwtPainter
 
diff --git a/qwt/transform.py b/qwt/transform.py
index e019409..304d6be 100644
--- a/qwt/transform.py
+++ b/qwt/transform.py
@@ -1,7 +1,9 @@
 # -*- coding: utf-8 -*-
 #
-# Licensed under the terms of the Qwt License, Copyright (C) 2002 Uwe Rathmann
-# (see qwt/LICENSE for details)
+# Licensed under the terms of the Qwt License
+# Copyright (c) 2002 Uwe Rathmann, for the original C++ code
+# Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
+# (see LICENSE file for more details)
 
 import numpy as np
 
diff --git a/setup.py b/setup.py
index edb28f5..06aecc0 100644
--- a/setup.py
+++ b/setup.py
@@ -1,136 +1,137 @@
-# -*- coding: utf-8 -*-
-#
-# Licensed under the terms of the MIT License
-# (see qwt/LICENSE for details)
-
-"""
-python-qwt
-==========
-
-Qt plotting widgets for Python
-"""
-
-from __future__ import print_function
-
-import os
-import sys
-import os.path as osp
-
-import setuptools  # analysis:ignore
-from distutils.core import setup
-from distutils.command.build import build
-
-LIBNAME = 'python-qwt'
-PACKAGE_NAME = 'qwt'
-from qwt import __version__ as version
-
-DESCRIPTION = 'Qt plotting widgets for Python'
-LONG_DESCRIPTION = """\
-The ``python-qwt`` project is a pure Python translation of the Qwt C++ library 
-which implements Qt widgets for plotting curves. 
-It consists of a single Python package named `qwt` (and examples, doc, ...).
-
-The ``python-qwt`` project was initiated to solve -at least temporarily- the 
-obsolescence issue of `PyQwt` (the Python-Qwt C++ bindings library) which is 
-no longer maintained. The idea was to translate the Qwt C++ code to Python and 
-then to optimize some parts of the code by writing new modules based on NumPy 
-and other libraries.
-
-The following ``Qwt`` classes won't be reimplemented in ``python-qwt`` because 
-most powerful features already exist in ``guiqwt``: QwtCounter, QwtPicker, 
-QwtPlotPicker, QwtPlotZoomer and QwtEventPattern.
-QwtClipper is not implemented (and it will probably be very difficult or 
-impossible to implement it in pure Python without performance issues). As a 
-consequence, when zooming in a plot curve, the entire curve is still painted 
-(in other words, when working with large amount of data, there is no 
-performance gain when zooming in)."""
-KEYWORDS = ''
-CLASSIFIERS = []
-if 'beta' in version or 'b' in version:
-    CLASSIFIERS += ['Development Status :: 4 - Beta']
-elif 'alpha' in version or 'a' in version:
-    CLASSIFIERS += ['Development Status :: 3 - Alpha']
-else:
-    CLASSIFIERS += ['Development Status :: 5 - Production/Stable']
-
-
-def get_package_data(name, extlist):
-    """Return data files for package *name* with extensions in *extlist*"""
-    flist = []
-    # Workaround to replace os.path.relpath (not available until Python 2.6):
-    offset = len(name)+len(os.pathsep)
-    for dirpath, _dirnames, filenames in os.walk(name):
-        for fname in filenames:
-            if not fname.startswith('.') and osp.splitext(fname)[1] in extlist:
-                flist.append(osp.join(dirpath, fname)[offset:])
-    return flist
-
-
-def get_subpackages(name):
-    """Return subpackages of package *name*"""
-    splist = []
-    for dirpath, _dirnames, _filenames in os.walk(name):
-        if osp.isfile(osp.join(dirpath, '__init__.py')):
-            splist.append(".".join(dirpath.split(os.sep)))
-    return splist
-
-
-try:
-    import sphinx
-except ImportError:
-    sphinx = None
-    
-from distutils.command.build import build as dftbuild
-
-class build(dftbuild):
-    def has_doc(self):
-        if sphinx is None:
-            return False
-        setup_dir = os.path.dirname(os.path.abspath(__file__))
-        return os.path.isdir(os.path.join(setup_dir, 'doc'))
-    sub_commands = dftbuild.sub_commands + [('build_doc', has_doc)]
-
-cmdclass = {'build' : build}
-
-if sphinx:
-    from sphinx.setup_command import BuildDoc
-    class build_doc(BuildDoc):
-        def run(self):
-            # make sure the python path is pointing to the newly built
-            # code so that the documentation is built on this and not a
-            # previously installed version
-            build = self.get_finalized_command('build')
-            sys.path.insert(0, os.path.abspath(build.build_lib))
-            try:
-                sphinx.setup_command.BuildDoc.run(self)
-            except UnicodeDecodeError:
-                print("ERROR: unable to build documentation because Sphinx do not handle source path with non-ASCII characters. Please try to move the source package to another location (path with *only* ASCII characters).", file=sys.stderr)
-            sys.path.pop(0)
-
-    cmdclass['build_doc'] = build_doc
-
-
-setup(name=LIBNAME, version=version,
-      description=DESCRIPTION, long_description=LONG_DESCRIPTION,
-      packages=get_subpackages(PACKAGE_NAME),
-      package_data={PACKAGE_NAME:
-                    get_package_data(PACKAGE_NAME, ('.png', '.svg', '.mo'))},
-      requires=["PyQt4 (>4.3)",],
-      author = "Pierre Raybaut",
-      author_email = 'pierre.raybaut at gmail.com',
-      url = 'https://github.com/PierreRaybaut/%s' % LIBNAME,
-      platforms = 'Any',
-      classifiers=CLASSIFIERS + [
-        'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
-        'Topic :: Scientific/Engineering :: Visualization',
-        'Topic :: Software Development :: Widget Sets',
-        'Operating System :: MacOS',
-        'Operating System :: Microsoft :: Windows',
-        'Operating System :: OS Independent',
-        'Operating System :: POSIX',
-        'Operating System :: Unix',
-        'Programming Language :: Python :: 2.6',
-        'Programming Language :: Python :: 2.7',
-        'Programming Language :: Python :: 3',
-        ],
-      cmdclass=cmdclass)
+# -*- coding: utf-8 -*-
+#
+# Licensed under the terms of the MIT License
+# Copyright (c) 2015 Pierre Raybaut
+# (see LICENSE file for more details)
+
+"""
+python-qwt
+==========
+
+Qt plotting widgets for Python
+"""
+
+from __future__ import print_function
+
+import os
+import sys
+import os.path as osp
+
+import setuptools  # analysis:ignore
+from distutils.core import setup
+from distutils.command.build import build
+
+LIBNAME = 'python-qwt'
+PACKAGE_NAME = 'qwt'
+from qwt import __version__ as version
+
+DESCRIPTION = 'Qt plotting widgets for Python'
+LONG_DESCRIPTION = """\
+The ``python-qwt`` project is a pure Python translation of the Qwt C++ library 
+which implements Qt widgets for plotting curves. 
+It consists of a single Python package named `qwt` (and examples, doc, ...).
+
+The ``python-qwt`` project was initiated to solve -at least temporarily- the 
+obsolescence issue of `PyQwt` (the Python-Qwt C++ bindings library) which is 
+no longer maintained. The idea was to translate the Qwt C++ code to Python and 
+then to optimize some parts of the code by writing new modules based on NumPy 
+and other libraries.
+
+The following ``Qwt`` classes won't be reimplemented in ``python-qwt`` because 
+most powerful features already exist in ``guiqwt``: QwtCounter, QwtPicker, 
+QwtPlotPicker, QwtPlotZoomer and QwtEventPattern.
+QwtClipper is not implemented (and it will probably be very difficult or 
+impossible to implement it in pure Python without performance issues). As a 
+consequence, when zooming in a plot curve, the entire curve is still painted 
+(in other words, when working with large amount of data, there is no 
+performance gain when zooming in)."""
+KEYWORDS = ''
+CLASSIFIERS = []
+if 'beta' in version or 'b' in version:
+    CLASSIFIERS += ['Development Status :: 4 - Beta']
+elif 'alpha' in version or 'a' in version:
+    CLASSIFIERS += ['Development Status :: 3 - Alpha']
+else:
+    CLASSIFIERS += ['Development Status :: 5 - Production/Stable']
+
+
+def get_package_data(name, extlist):
+    """Return data files for package *name* with extensions in *extlist*"""
+    flist = []
+    # Workaround to replace os.path.relpath (not available until Python 2.6):
+    offset = len(name)+len(os.pathsep)
+    for dirpath, _dirnames, filenames in os.walk(name):
+        for fname in filenames:
+            if not fname.startswith('.') and osp.splitext(fname)[1] in extlist:
+                flist.append(osp.join(dirpath, fname)[offset:])
+    return flist
+
+
+def get_subpackages(name):
+    """Return subpackages of package *name*"""
+    splist = []
+    for dirpath, _dirnames, _filenames in os.walk(name):
+        if osp.isfile(osp.join(dirpath, '__init__.py')):
+            splist.append(".".join(dirpath.split(os.sep)))
+    return splist
+
+
+try:
+    import sphinx
+except ImportError:
+    sphinx = None
+    
+from distutils.command.build import build as dftbuild
+
+class build(dftbuild):
+    def has_doc(self):
+        if sphinx is None:
+            return False
+        setup_dir = os.path.dirname(os.path.abspath(__file__))
+        return os.path.isdir(os.path.join(setup_dir, 'doc'))
+    sub_commands = dftbuild.sub_commands + [('build_doc', has_doc)]
+
+cmdclass = {'build' : build}
+
+if sphinx:
+    from sphinx.setup_command import BuildDoc
+    class build_doc(BuildDoc):
+        def run(self):
+            # make sure the python path is pointing to the newly built
+            # code so that the documentation is built on this and not a
+            # previously installed version
+            build = self.get_finalized_command('build')
+            sys.path.insert(0, os.path.abspath(build.build_lib))
+            try:
+                sphinx.setup_command.BuildDoc.run(self)
+            except UnicodeDecodeError:
+                print("ERROR: unable to build documentation because Sphinx do not handle source path with non-ASCII characters. Please try to move the source package to another location (path with *only* ASCII characters).", file=sys.stderr)
+            sys.path.pop(0)
+
+    cmdclass['build_doc'] = build_doc
+
+
+setup(name=LIBNAME, version=version,
+      description=DESCRIPTION, long_description=LONG_DESCRIPTION,
+      packages=get_subpackages(PACKAGE_NAME),
+      package_data={PACKAGE_NAME:
+                    get_package_data(PACKAGE_NAME, ('.png', '.svg', '.mo'))},
+      requires=["PyQt4 (>4.3)",],
+      author = "Pierre Raybaut",
+      author_email = 'pierre.raybaut at gmail.com',
+      url = 'https://github.com/PierreRaybaut/%s' % LIBNAME,
+      platforms = 'Any',
+      classifiers=CLASSIFIERS + [
+        'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
+        'Topic :: Scientific/Engineering :: Visualization',
+        'Topic :: Software Development :: Widget Sets',
+        'Operating System :: MacOS',
+        'Operating System :: Microsoft :: Windows',
+        'Operating System :: OS Independent',
+        'Operating System :: POSIX',
+        'Operating System :: Unix',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
+        ],
+      cmdclass=cmdclass)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-qwt.git



More information about the debian-science-commits mailing list