@@ -21,32 +21,45 @@ of a few other files (examples, doc, ...).
2121See documentation [ online] ( https://pythonqwt.readthedocs.io/en/latest/ ) or [ PDF] ( https://pythonqwt.readthedocs.io/_/downloads/en/latest/pdf/ ) for more details on
2222the library and [ changelog] ( CHANGELOG.md ) for recent history of changes.
2323
24- ## Copyrights
24+ ## Sample
2525
26- #### Main code base
27- - Copyright © 2002 Uwe Rathmann, for the original Qwt C++ code
28- - Copyright © 2015 Pierre Raybaut, for the Qwt C++ to Python translation and
29- optimization
30- - Copyright © 2015 Pierre Raybaut, for the PythonQwt specific and exclusive
31- Python material
26+ ``` python
27+ import qwt
28+ import numpy as np
3229
33- #### PyQt, PySide and Python2/Python3 compatibility modules
34- - Copyright © 2009-2013 Pierre Raybaut
35- - Copyright © 2013-2015 The Spyder Development Team
30+ app = qwt.qt.QtGui.QApplication([])
3631
37- #### Some examples
38- - Copyright © 2003-2009 Gerard Vermeulen, for the original PyQwt code
39- - Copyright © 2015 Pierre Raybaut, for the PyQt5/PySide port and further
40- developments (e.g. ported to PythonQwt API)
32+ # Create plot widget
33+ plot = qwt.QwtPlot(" Trigonometric functions" )
34+ plot.insertLegend(qwt.QwtLegend(), qwt.QwtPlot.BottomLegend)
4135
42- ## License
36+ # Create two curves and attach them to plot
37+ x = np.linspace(- 10 , 10 , 500 )
38+ qwt.QwtPlotCurve.make(x, np.cos(x), " Cosinus" , plot, linecolor = " red" , antialiased = True )
39+ qwt.QwtPlotCurve.make(x, np.sin(x), " Sinus" , plot, linecolor = " blue" , antialiased = True )
4340
44- The ` qwt ` Python package was partly (>95%) translated from Qwt C++ library:
45- the associated code is distributed under the terms of the LGPL license. The
46- rest of the code was either wrote from scratch or strongly inspired from MIT
47- licensed third-party software.
41+ # Resize and show plot
42+ plot.resize(600 , 300 )
43+ plot.show()
44+
45+ app.exec_()
46+ ```
4847
49- See included [ LICENSE] ( LICENSE ) file for more details about licensing terms.
48+ <img src =" https://raw.githubusercontent.com/PierreRaybaut/PythonQwt/master/doc/images/QwtPlot_example.png " >
49+ ## Examples (tests)
50+
51+ The GUI-based test launcher may be executed from Python:
52+
53+ ``` python
54+ from qwt import tests
55+ tests.run()
56+ ```
57+
58+ or from the command line:
59+
60+ ``` bash
61+ PythonQwt-tests
62+ ```
5063
5164## Overview
5265
@@ -79,35 +92,29 @@ From the source package:
7992python setup.py install
8093```
8194
82- ## Examples (tests)
83-
84- The GUI-based test launcher may be executed from Python:
85-
86- ``` python
87- from qwt import tests
88- tests.run()
89- ```
95+ ## Copyrights
9096
91- or from the command line:
97+ #### Main code base
98+ - Copyright © 2002 Uwe Rathmann, for the original Qwt C++ code
99+ - Copyright © 2015 Pierre Raybaut, for the Qwt C++ to Python translation and
100+ optimization
101+ - Copyright © 2015 Pierre Raybaut, for the PythonQwt specific and exclusive
102+ Python material
92103
93- ``` bash
94- PythonQwt-tests
95- ```
104+ #### PyQt, PySide and Python2/Python3 compatibility modules
105+ - Copyright © 2009-2013 Pierre Raybaut
106+ - Copyright © 2013-2015 The Spyder Development Team
96107
97- ## Sample
108+ #### Some examples
109+ - Copyright © 2003-2009 Gerard Vermeulen, for the original PyQwt code
110+ - Copyright © 2015 Pierre Raybaut, for the PyQt5/PySide port and further
111+ developments (e.g. ported to PythonQwt API)
98112
99- ``` python
100- import qwt
101- import numpy as np
113+ ## License
102114
103- app = qwt.qt.QtGui.QApplication([])
104- x = np.linspace(- 10 , 10 , 500 )
105- plot = qwt.QwtPlot(" Trigonometric functions" )
106- plot.insertLegend(qwt.QwtLegend(), qwt.QwtPlot.BottomLegend)
107- qwt.QwtPlotCurve.make(x, np.cos(x), " Cosinus" , plot, linecolor = " red" , antialiased = True )
108- qwt.QwtPlotCurve.make(x, np.sin(x), " Sinus" , plot, linecolor = " blue" , antialiased = True )
109- plot.resize(600 , 300 )
110- plot.show()
111- ```
115+ The ` qwt ` Python package was partly (>95%) translated from Qwt C++ library:
116+ the associated code is distributed under the terms of the LGPL license. The
117+ rest of the code was either wrote from scratch or strongly inspired from MIT
118+ licensed third-party software.
112119
113- < img src = " https://raw.githubusercontent.com/PierreRaybaut/PythonQwt/master/doc/images/QwtPlot_example.png " >
120+ See included [ LICENSE ] ( LICENSE ) file for more details about licensing terms.
0 commit comments