proc-plot


Nameproc-plot JSON
Version 1.7 PyPI version JSON
download
home_pagehttps://github.com/fpieterse/proc_plot
SummaryTrending for Process Control Data Analysis
upload_time2023-12-22 03:47:23
maintainer
docs_urlNone
authorFrancois Pieterse
requires_python
licenseGPLv3
keywords trend process control
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # proc_plot
Quick interactive trending of time series data for process control data analysis.


## Usage
To start, read process data into a pandas Dataframe.  It will work best if the column names in the dataframe are DCS tagnames e.g. FIC101.SP.  Next, let proc_plot know which dataframe to use and call the show() function to show the main window.

```
%matplotlib qt
import matplotlib.pyplot as plt
import proc_plot
import pandas
df = pandas.read_excel('data.xlsx',parse_dates=True)
proc_plot.set_dataframe(df)
proc_plot.show()
```

## Grouping Rules
proc_plot uses regular expression rules to group tags that should be plotted on the same axis.
See `help(proc_plot.add_grouping_rule)` for examples if you want to customise grouping rules.
Since v1.4, the function load_grouping_template() makes it easy to load preconfigured grouping rules for different kinds of data.  v1.4 includes templates 'ProfCon' and 'DMC'.

## %matplotlib magic
The intended use of proc_plot is to call it from a jupyter notebook.  The way the qt gui loop runs in jupyter is tricky and proc_plot includes logic to check which backend is used (plt.get_backend) to tell if the notebook is using `%matplotlib qt` or `%matplotlib notebook`.

It is possible to switch the backend after the %matplotlib magic, if the backend is switched before proc_plot is imported then proc_plot could break the qt gui loop.  In previous versions of matplotlib I recommended using `%matplotlib qt`, and then switching the backend with `plt.switch_backend('nbagg')` after importing proc_plot if you want to use interactive notebook plots and proc_plot in the same notebook.

In current versions of jupyter notebook and matplotlib, using `%matplotlib notebook` works well.

## Show Me
The tool has a button "Show Me" that will show you python code to generate the current trend.  The code assumes your dataframe is called `df` and that you imported `matplotlib.pyplot as plt`. 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fpieterse/proc_plot",
    "name": "proc-plot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Trend,Process Control",
    "author": "Francois Pieterse",
    "author_email": "francois.pieterse@greenferndynamics.com",
    "download_url": "https://files.pythonhosted.org/packages/d2/d0/002928eeb0d552872a41ee6d33409df4959c22d2c02df7c20e2f835e57d1/proc_plot-1.7.tar.gz",
    "platform": null,
    "description": "# proc_plot\r\nQuick interactive trending of time series data for process control data analysis.\r\n\r\n\r\n## Usage\r\nTo start, read process data into a pandas Dataframe.  It will work best if the column names in the dataframe are DCS tagnames e.g. FIC101.SP.  Next, let proc_plot know which dataframe to use and call the show() function to show the main window.\r\n\r\n```\r\n%matplotlib qt\r\nimport matplotlib.pyplot as plt\r\nimport proc_plot\r\nimport pandas\r\ndf = pandas.read_excel('data.xlsx',parse_dates=True)\r\nproc_plot.set_dataframe(df)\r\nproc_plot.show()\r\n```\r\n\r\n## Grouping Rules\r\nproc_plot uses regular expression rules to group tags that should be plotted on the same axis.\r\nSee `help(proc_plot.add_grouping_rule)` for examples if you want to customise grouping rules.\r\nSince v1.4, the function load_grouping_template() makes it easy to load preconfigured grouping rules for different kinds of data.  v1.4 includes templates 'ProfCon' and 'DMC'.\r\n\r\n## %matplotlib magic\r\nThe intended use of proc_plot is to call it from a jupyter notebook.  The way the qt gui loop runs in jupyter is tricky and proc_plot includes logic to check which backend is used (plt.get_backend) to tell if the notebook is using `%matplotlib qt` or `%matplotlib notebook`.\r\n\r\nIt is possible to switch the backend after the %matplotlib magic, if the backend is switched before proc_plot is imported then proc_plot could break the qt gui loop.  In previous versions of matplotlib I recommended using `%matplotlib qt`, and then switching the backend with `plt.switch_backend('nbagg')` after importing proc_plot if you want to use interactive notebook plots and proc_plot in the same notebook.\r\n\r\nIn current versions of jupyter notebook and matplotlib, using `%matplotlib notebook` works well.\r\n\r\n## Show Me\r\nThe tool has a button \"Show Me\" that will show you python code to generate the current trend.  The code assumes your dataframe is called `df` and that you imported `matplotlib.pyplot as plt`. \r\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Trending for Process Control Data Analysis",
    "version": "1.7",
    "project_urls": {
        "Download": "https://github.com/fpieterse/proc_plot/archive/v1.7.tar.gz",
        "Homepage": "https://github.com/fpieterse/proc_plot"
    },
    "split_keywords": [
        "trend",
        "process control"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2d0002928eeb0d552872a41ee6d33409df4959c22d2c02df7c20e2f835e57d1",
                "md5": "2e9e09555af8258e71ff5e8737e2da55",
                "sha256": "f069b9eb98245fbae470a8a008a8b8a023cc6de4222792b2d9f14e077f81b0c6"
            },
            "downloads": -1,
            "filename": "proc_plot-1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "2e9e09555af8258e71ff5e8737e2da55",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 24838,
            "upload_time": "2023-12-22T03:47:23",
            "upload_time_iso_8601": "2023-12-22T03:47:23.090434Z",
            "url": "https://files.pythonhosted.org/packages/d2/d0/002928eeb0d552872a41ee6d33409df4959c22d2c02df7c20e2f835e57d1/proc_plot-1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-22 03:47:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fpieterse",
    "github_project": "proc_plot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "proc-plot"
}
        
Elapsed time: 0.16208s