QCharted


NameQCharted JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://github.com/arnobaer/QCharted
SummaryPlotting large data series using PyQtChart.
upload_time2023-07-13 12:20:26
maintainer
docs_urlNone
authorBernhard Arnold
requires_python
licenseGPLv3
keywords
VCS
bugtrack_url
requirements namegenerator numpy PyQt5 PyQtChart
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # QCharted

Plotting large data series using [PyQtChart](https://www.riverbankcomputing.com/software/pyqtchart/intro).

Currently supports `LineSeries`, `SplineSeries` and `ScatterSeries`.

## Quick start

Install using pip.

```bash
pip install QCharted
```

Create a plot widget, assign two axes and some line series.

```python
import sys
from PyQt5 import QtCore, QtWidgets
from QCharted import Chart, ChartView

app = QtWidgets.QApplication(sys.argv)

# Create chart
chart = Chart()

# Create multiple axis
x = chart.addDateTimeAxis(QtCore.Qt.AlignBottom)
x.setTitleText("Time")
y1 = chart.addValueAxis(QtCore.Qt.AlignLeft)
y1.setTitleText("Temp")
y2 = chart.addValueAxis(QtCore.Qt.AlignRight)
y2.setTitleText("Humid")

# Create multiple series
temp = chart.addLineSeries(x, y)
temp.setPen(QtCore.Qt.red)
humid = chart.addLineSeries(x, y)
humid.setPen(QtCore.Qt.blue)

# Replace data, note the `data()` method
temp.data().replace([(0, 21.8), (1, 22.3)])
humid.data().replace([(0, 50.3), (1, 51.1)])

# Append data, note the `data()` method
temp.data().append(2, 22.1)
humid.data().append(2, 51.0)

# Create chart view
view = ChartView()
view.setChart(chart)
view.show()

# Fit to extent
chart.fit()

app.exec_()
```

## Custom series classes

Actual data is stored in a `data` property using `numpy`.

```python
# Instead of QLineSeries()
series = LineSeries()
# Replace data
series.data().replace([...])
# Append to data
series.data().append(2, 3)
# Clear data
series.data().clear()
```


## Example application

The supplied example application renders 16 x 250k data samples fluently even while
zooming. The QtChart line series only contain a sampled subset of the actual data. See
[examples/main.py](/examples/main.py) for the example source.

Make sure to first install additional dependencies provided in `requirements.txt`.

```bash
python -m venv env
. env/bin/activate
(env) pip install -r requirements.txt
(env) python setup.py develop
(env) python examples/main.py
```

Run the application with different options to see live plotting in action.

```bash
(env) python examples/main.py -c 8 -s 100
```

## License

QCharted is licensed under the [GNU General Public License Version 3](/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/arnobaer/QCharted",
    "name": "QCharted",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Bernhard Arnold",
    "author_email": "bernhard.arnold@oeaw.ac.at",
    "download_url": "https://files.pythonhosted.org/packages/5c/3a/d1d35981013242cabbbc51ae377a9a6d4b178c699c901033e88b9dfa7bc0/QCharted-1.1.3.tar.gz",
    "platform": null,
    "description": "# QCharted\n\nPlotting large data series using [PyQtChart](https://www.riverbankcomputing.com/software/pyqtchart/intro).\n\nCurrently supports `LineSeries`, `SplineSeries` and `ScatterSeries`.\n\n## Quick start\n\nInstall using pip.\n\n```bash\npip install QCharted\n```\n\nCreate a plot widget, assign two axes and some line series.\n\n```python\nimport sys\nfrom PyQt5 import QtCore, QtWidgets\nfrom QCharted import Chart, ChartView\n\napp = QtWidgets.QApplication(sys.argv)\n\n# Create chart\nchart = Chart()\n\n# Create multiple axis\nx = chart.addDateTimeAxis(QtCore.Qt.AlignBottom)\nx.setTitleText(\"Time\")\ny1 = chart.addValueAxis(QtCore.Qt.AlignLeft)\ny1.setTitleText(\"Temp\")\ny2 = chart.addValueAxis(QtCore.Qt.AlignRight)\ny2.setTitleText(\"Humid\")\n\n# Create multiple series\ntemp = chart.addLineSeries(x, y)\ntemp.setPen(QtCore.Qt.red)\nhumid = chart.addLineSeries(x, y)\nhumid.setPen(QtCore.Qt.blue)\n\n# Replace data, note the `data()` method\ntemp.data().replace([(0, 21.8), (1, 22.3)])\nhumid.data().replace([(0, 50.3), (1, 51.1)])\n\n# Append data, note the `data()` method\ntemp.data().append(2, 22.1)\nhumid.data().append(2, 51.0)\n\n# Create chart view\nview = ChartView()\nview.setChart(chart)\nview.show()\n\n# Fit to extent\nchart.fit()\n\napp.exec_()\n```\n\n## Custom series classes\n\nActual data is stored in a `data` property using `numpy`.\n\n```python\n# Instead of QLineSeries()\nseries = LineSeries()\n# Replace data\nseries.data().replace([...])\n# Append to data\nseries.data().append(2, 3)\n# Clear data\nseries.data().clear()\n```\n\n\n## Example application\n\nThe supplied example application renders 16 x 250k data samples fluently even while\nzooming. The QtChart line series only contain a sampled subset of the actual data. See\n[examples/main.py](/examples/main.py) for the example source.\n\nMake sure to first install additional dependencies provided in `requirements.txt`.\n\n```bash\npython -m venv env\n. env/bin/activate\n(env) pip install -r requirements.txt\n(env) python setup.py develop\n(env) python examples/main.py\n```\n\nRun the application with different options to see live plotting in action.\n\n```bash\n(env) python examples/main.py -c 8 -s 100\n```\n\n## License\n\nQCharted is licensed under the [GNU General Public License Version 3](/LICENSE).\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Plotting large data series using PyQtChart.",
    "version": "1.1.3",
    "project_urls": {
        "Homepage": "https://github.com/arnobaer/QCharted"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4aa6082747fd0c8631c543a22961c686a7de1baacd71a121fb8c5bd659e45006",
                "md5": "bb7d46898a0fbad58f05efd5e2527643",
                "sha256": "8f9b741370ba18e4f220a1922b1ec2b352255fbf7525f53a6371973c5092773d"
            },
            "downloads": -1,
            "filename": "QCharted-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb7d46898a0fbad58f05efd5e2527643",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19213,
            "upload_time": "2023-07-13T12:20:25",
            "upload_time_iso_8601": "2023-07-13T12:20:25.087914Z",
            "url": "https://files.pythonhosted.org/packages/4a/a6/082747fd0c8631c543a22961c686a7de1baacd71a121fb8c5bd659e45006/QCharted-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c3ad1d35981013242cabbbc51ae377a9a6d4b178c699c901033e88b9dfa7bc0",
                "md5": "782809c85a752fef77e4ad9cd5fa9982",
                "sha256": "5cb64ae5958727dbcc224c9be33f1b59be827c24090de8fdc84448973c91d14b"
            },
            "downloads": -1,
            "filename": "QCharted-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "782809c85a752fef77e4ad9cd5fa9982",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19935,
            "upload_time": "2023-07-13T12:20:26",
            "upload_time_iso_8601": "2023-07-13T12:20:26.642916Z",
            "url": "https://files.pythonhosted.org/packages/5c/3a/d1d35981013242cabbbc51ae377a9a6d4b178c699c901033e88b9dfa7bc0/QCharted-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-13 12:20:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "arnobaer",
    "github_project": "QCharted",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "namegenerator",
            "specs": [
                [
                    ">=",
                    "1.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.17"
                ]
            ]
        },
        {
            "name": "PyQt5",
            "specs": [
                [
                    ">=",
                    "5.12"
                ]
            ]
        },
        {
            "name": "PyQtChart",
            "specs": [
                [
                    ">=",
                    "5.12"
                ]
            ]
        }
    ],
    "lcname": "qcharted"
}
        
Elapsed time: 0.09634s